file upload in grid view edit templete

ZEPBAPANITA

New Member
when i m updating with file upload has no file it replace old path with null any idea to solve itstring filename = "", _path = ""; FileUpload fileUpload = GridView1.Rows[e.RowIndex].FindControl("FileUpload1") as FileUpload; filename = fileUpload.FileName; if (fileUpload.HasFile) { _path = Server.MapPath("~/Gallery_Image/") + filename; fileUpload.SaveAs(_path); SqlDataSource1.UpdateParameters["Fac_Image"].DefaultValue = "http://stackoverflow.com/questions/13775486/~/Gallery_Image/" + fileUpload.FileName; } else {\[code\] }\[/code\]
 
Back
Top