Z
zlf
Hello,
I have a GridView with TemplateField. I want to get the <asp:TextBox
ID="TextBox1" runat="server"></asp:TextBox> in TemplateField in programmatic
way. e.g: GridView1.TextBox1 or GridView1.FindControl("TextBox1"), but
neither of them works. Please help me.
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"
DataKeyNames="Employeeid"
DataSourceID="ObjectDataSource1">
<Columns>
<asp:BoundField DataField="Country" HeaderText="Country"
SortExpression="Country" />
<asp:TemplateField HeaderText="link">
<ItemTemplate>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
Thanks
zlf
I have a GridView with TemplateField. I want to get the <asp:TextBox
ID="TextBox1" runat="server"></asp:TextBox> in TemplateField in programmatic
way. e.g: GridView1.TextBox1 or GridView1.FindControl("TextBox1"), but
neither of them works. Please help me.
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"
DataKeyNames="Employeeid"
DataSourceID="ObjectDataSource1">
<Columns>
<asp:BoundField DataField="Country" HeaderText="Country"
SortExpression="Country" />
<asp:TemplateField HeaderText="link">
<ItemTemplate>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
Thanks
zlf