Skip to content

Instantly share code, notes, and snippets.

@MBehtemam
Created September 1, 2013 07:20
Show Gist options
  • Save MBehtemam/6402857 to your computer and use it in GitHub Desktop.
Save MBehtemam/6402857 to your computer and use it in GitHub Desktop.
C# Image Uploader
string filename = Path.GetFileName(FileUpload1.FileName);
string path = Server.MapPath("~/Images/personel/") + filename;
FileUpload1.SaveAs(path);
Change to :
string filename = Path.GetFileName(FileUpload1.FileName);
string path = "Images/personel/" + filename;
FileUpload1.SaveAs(Server.MapPath(path));
//----------------------------------------------------------
while (reader.Read())
{
string add = reader["imageUrl"].ToString();
Image1.ImageUrl=@"E:\Images\378084_1nJymNOS.jpg";
}
Change to :
while (reader.Read())
{
string add = reader["imageUrl"].ToString();
Image1.ImageUrl=add;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment