P
Paul
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_quotes" runat="server"
AutoGenerateColumns="False" CssClass="gv">
<HeaderStyle CssClass="gv_header" />
<AlternatingRowStyle CssClass="gv_alt_row" />
<Columns>
<asp:BoundField DataField="line_part_num" HeaderText="SO Part">
<ItemStyle HorizontalAlign="Left" />
<HeaderStyle HorizontalAlign="Left" />
</asp:BoundField>
<asp:TemplateField HeaderText="Vendor Quote Document">
<ItemStyle HorizontalAlign="Center" />
<HeaderStyle HorizontalAlign="Center" />
<ItemTemplate>
<asp:FileUpload ID="fu_vendor_quote" runat="server"
/><asp:HyperLink ID="lnk_vendor_quote" runat="server" Target="_blank" />
</ItemTemplate>
</asp:TemplateField>
</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_quotes" runat="server"
AutoGenerateColumns="False" CssClass="gv">
<HeaderStyle CssClass="gv_header" />
<AlternatingRowStyle CssClass="gv_alt_row" />
<Columns>
<asp:BoundField DataField="line_part_num" HeaderText="SO Part">
<ItemStyle HorizontalAlign="Left" />
<HeaderStyle HorizontalAlign="Left" />
</asp:BoundField>
<asp:TemplateField HeaderText="Vendor Quote Document">
<ItemStyle HorizontalAlign="Center" />
<HeaderStyle HorizontalAlign="Center" />
<ItemTemplate>
<asp:FileUpload ID="fu_vendor_quote" runat="server"
/><asp:HyperLink ID="lnk_vendor_quote" runat="server" Target="_blank" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>