I have a gridview with 2 columns.
One column is a BoundColumn to a part number (string).
One column is an ItemTemplate with a FileUpload control.
There can be multiple rows (i.e. part numbers) in the gridview.
The user attaches a file for each part number / row.
The user clicks a button after attaching all the needed files.
I am having a problem accessing the FileUpload properties after the button's
OnClick event.
I have looked at the FindControl method, but I am having a hard time
determining the correct control name.
To make things more complicated, I am also using master pages, which modify
the control's name based on the number of rows in the gridview.
Can anyone point me to an example of this scenario?
TIA
Here is the gridview code:
<asp:GridView ID="gv_vendor_q uotes" runat="server"
AutoGenerateCol umns="False" CssClass="gv">
<HeaderStyle CssClass="gv_he ader" />
<AlternatingRow Style CssClass="gv_al t_row" />
<Columns>
<asp:BoundFie ld DataField="line _part_num" HeaderText="SO Part">
<ItemStyle HorizontalAlign ="Left" />
<HeaderStyle HorizontalAlign ="Left" />
</asp:BoundField>
<asp:TemplateFi eld HeaderText="Ven dor Quote Document">
<ItemStyle HorizontalAlign ="Center" />
<HeaderStyle HorizontalAlign ="Center" />
<ItemTemplate >
<asp:FileUplo ad ID="fu_vendor_q uote" runat="server"
/><asp:HyperLi nk ID="lnk_vendor_ quote" runat="server" Target="_blank" />
</ItemTemplate>
</asp:TemplateFie ld>
</Columns>
</asp:GridView>
One column is a BoundColumn to a part number (string).
One column is an ItemTemplate with a FileUpload control.
There can be multiple rows (i.e. part numbers) in the gridview.
The user attaches a file for each part number / row.
The user clicks a button after attaching all the needed files.
I am having a problem accessing the FileUpload properties after the button's
OnClick event.
I have looked at the FindControl method, but I am having a hard time
determining the correct control name.
To make things more complicated, I am also using master pages, which modify
the control's name based on the number of rows in the gridview.
Can anyone point me to an example of this scenario?
TIA
Here is the gridview code:
<asp:GridView ID="gv_vendor_q uotes" runat="server"
AutoGenerateCol umns="False" CssClass="gv">
<HeaderStyle CssClass="gv_he ader" />
<AlternatingRow Style CssClass="gv_al t_row" />
<Columns>
<asp:BoundFie ld DataField="line _part_num" HeaderText="SO Part">
<ItemStyle HorizontalAlign ="Left" />
<HeaderStyle HorizontalAlign ="Left" />
</asp:BoundField>
<asp:TemplateFi eld HeaderText="Ven dor Quote Document">
<ItemStyle HorizontalAlign ="Center" />
<HeaderStyle HorizontalAlign ="Center" />
<ItemTemplate >
<asp:FileUplo ad ID="fu_vendor_q uote" runat="server"
/><asp:HyperLi nk ID="lnk_vendor_ quote" runat="server" Target="_blank" />
</ItemTemplate>
</asp:TemplateFie ld>
</Columns>
</asp:GridView>
Comment