protected void btn_Create_Click(object sender, EventArgs e) { if (FileUpload1.HasFile) { string filename = System.IO.Path.GetFileName(FileUpload1.FileName); FileUpload1.SaveAs(Server.MapPath("~/Images/") + filename); /*Uploaded file path*/ string filePath = "Images/" + filename; /*Code to save the file path into data base*/ lblDisplay.Text = "File uploaded successfully."; Image1.ImageUrl = filePath; } else { lblDisplay.Text = "Please select file."; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)