File Upload tagged posts

Upload Image in Folder using FileUpload Control in Asp.net

Category: ASP.NET Comments: No comments

Upload Image in Folder using FileUpload Control in Asp.net

string fileimage;
if (FileUpload1.HasFile)
{
fileimage = System.IO.Path.GetFileName(FileUpload1.FileName);
FileUpload1.SaveAs(Server.MapPath(“~/images/” + fileimage));
fileimage = “images/” + FileUpload1.FileName;
}
else
{
fileimage = “images/noimage.jpg”;
}

Read More