How to find textbox control inside gridview footer
How to find textbox control inside gridview footer
C# code :
TextBox YourTxtBoxName= (TextBox)GridView1.FooterRow.FindControl("FooterTextBox");
Gridview :
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" EmptyDataText="There are no data records to display." ShowFooter="True">
<Columns>
<asp:TemplateField HeaderText="Subject" SortExpression="Subject">
<EditItemTemplate>
<asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("col_Name") %>'></asp:TextBox>
</EditItemTemplate>
<FooterTemplate>
<asp:TextBox ID="FooterTextBox" runat="server" Width="77px"></asp:TextBox>
<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="Add" />
</FooterTemplate>
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%# Bind("col_Name") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
How to find textbox control inside gridview footer
Reviewed by (C#) Csharp examples
on
10:19 AM
Rating:
No comments: