Deepak Rai

Deepak Rai

  • NA
  • 45
  • 8.7k

Save image in folder using "Server.MapPath".

Jun 22 2018 4:31 AM
Hello,
    I want to save image directly in my application folder "imz/entertainmentz/" i searched a code and applied it in my application it works for my local machine. But when i publish it in remote server it can't save the image in same path.
 
Here is my code:
 
string filePath = ppUpload.PostedFile.FileName;
ppUpload.SaveAs(Server.MapPath("~/imz/Entertainmentz/" + filePath)); 

Answers (6)