Code Behind File:
protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
{
if(GridView1.EditIndex == -1) return;
FileUpload fileUpLoad = GridView1.Rows[GridView1.EditIndex].FindControl("FileUpload1") as FileUpload;
string fileName = fileUpLoad.FileName;
string fullPath = Path.GetFullPath(fileName);
fileUpLoad.SaveAs(fullPath);
}
1 Comments:
That's not work for me... File Upload always returns null....
Post a Comment