Don't make it to the server. When you use the Server.MapPath() it's going to map it to the root folder. You can also try to make sure the mapping is correct and using an @ so that it knows it's a literal path like this below or use a tilde to make sure it
maps correctly.
webguy07
Participant
942 Points
234 Posts
Re: FileUpload1.SaveAs does not work correctly?
Apr 30, 2012 09:04 PM|LINK
Don't make it to the server. When you use the Server.MapPath() it's going to map it to the root folder. You can also try to make sure the mapping is correct and using an @ so that it knows it's a literal path like this below or use a tilde to make sure it maps correctly.
Server.MapPath(@"c:\\data\\files\\");
~/data/files/" + FileUpload1.FileName);