简体   繁体   中英

File Upload in each row of gridview

I have a File upload control inside a gridview item template like

     <ItemTemplate>
       <asp:FileUpload ID="flUpload"  runat="server" />
     </ItemTemplate>

And i have a button outside the grid view which says upload and i want to upload all files in the grid view one by one. But my problem is that when i select some file in the file upload control the upload button is not firing the click event. Let me know if there is some way the click will work.

There are three templates in a gridview per column. You have placed the FU in the static or display 'item' template. Move it to the edit or the other one(not at a computer to see the name). If your grid is inside a 'update Panel' the FU control is not compatable with it either.

You also should consider creating a detailsview and place it in there so when the user selects that row they can edit upload whatever you need. Forget my updat panel thing I see you already answered that.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM