3
Answers

Display Image from Folder on Server

toanhoi bui

toanhoi bui

13y
3.2k
1
Hello everbody, I uploaded a image to server and want to show image on Image control by ASP. My code
  String filename = FileUpload1.PostedFile.FileName;
  string strFilename = Server.MapPath("Sample") + "//" + filename;
  FileUpload1.PostedFile.SaveAs(strFilename);
  //Show Image
  Image2.ImageUrl=strFilename ;
But it does not run. Can you help me to show a image on server.Thanks

Answers (3)