toanhoi bui

toanhoi bui

  • NA
  • 70
  • 207.1k

Display Image from Folder on Server

Sep 14 2011 1:12 AM
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)