I have gridview just like below i want to update all the rows whos are check i have done this but now i have added a template filed with fileupload control and at the end after the gridview control i have a update button my all works are going fine before but when i include the fileupload control and on the click of the button Update my file controls always shows nothing below is the line which read my file content
" Dim fuploadFile As FileUpload = CType(grdSecurityQuestions.FindControl("FileUpload2"), FileUpload)"
it always shows nothing but when i use Upload button inside the template field then it save my file into my directory . but i want to save all the files at the end by using the button at the end not usiing the button inside the template field of gridview below is the diagram of my grid.



Rajeev PunhaniRank #551 · 4.4K reputationPosted Mar 1, 2016, 10:39 PM EST
HI Danish,
Please try
{
FileUpload fuCOA = (FileUpload)gvRow.FindControl("FileUpload4");
if(fuCOA.HasFile
{}
Rajeev PunhaniRank #551 · 4.4K reputationPosted Mar 1, 2016, 9:14 PM EST
Hi Danish,
please see the below link.
Danish HabibRank #2,024 · 715 reputationPosted Mar 1, 2016, 9:17 PM EST
protected void Button1_Click(object sender, EventArgs e) { Button buttonupload = (Button)sender; GridViewRow gvRow = (GridViewRow)buttonupload.NamingContainer; FileUpload fuCOA = (FileUpload)gvRow.FindControl("FileUpload4"); }Amit KumarRank #459 · 5.4K reputationPosted Mar 1, 2016, 9:26 PM EST
Danish HabibRank #2,024 · 715 reputationPosted Mar 1, 2016, 9:34 PM EST
Danish HabibRank #2,024 · 715 reputationPosted Mar 1, 2016, 11:18 PM EST