About finding footer control inside gridview inside in formview in asp.net
<p>I have formview control. Inside formview control their is one gridview. In gridview i have FooterTemplate(In footertemplate i have textbox control to add text)to add text. To find that control i have written code as follows:</p>

<pre><code> GridView mygridview = (GridView)FVAddCustomer.FindControl("mygridview");
TextBox txtFName1 = (TextBox)mygridview.FooterRow.FindControl("txtFName1");
</code></pre>

<p>Is this right or any other way? because when i find textbox value then its getting null?
Please help me? </p>

<pre><code>  &lt;asp:GridView ID="mygridview" runat="server" AutoGenerateColumns="False" ShowFooter="True" BackColor="White" BorderColor="#336666" BorderWidth="3px" CellPadding="4" GridLines="Horizontal" BorderStyle="Double" Width="100%" OnRowEditing="mygridview_RowEditing" OnRowCancelingEdit="mygridview_RowCancelingEdit" OnRowUpdating="mygridview_RowUpdating" Visible="false"&gt;
       &lt;FooterStyle BackColor="White" ForeColor="#333333" /&gt;
       &lt;PagerStyle BackColor="#336666" ForeColor="White" HorizontalAlign="Center" /&gt;
       &lt;SelectedRowStyle BackColor="#339966" ForeColor="White" Font-Bold="True" /&gt;
       &lt;HeaderStyle BackColor="#336666" Font-Bold="True" ForeColor="White" /&gt;
       &lt;Columns&gt;
          &lt;asp:TemplateField HeaderText="First Name"&gt;
             &lt;ItemTemplate&gt;
                 &lt;asp:Label ID="lblFName1" runat="server" Text='&lt;%#Eval("FirstName")%&gt;'&gt;&lt;/asp:Label&gt;
             &lt;/ItemTemplate&gt;
             &lt;EditItemTemplate&gt;
                  &lt;asp:TextBox ID="txtFName1Edit" runat="server" Width="90px"&gt;&lt;/asp:TextBox&gt;
            &lt;/EditItemTemplate&gt;
            &lt;FooterTemplate&gt;
               &lt;asp:TextBox ID="txtFName1" runat="server" Width="90px"&gt;&lt;/asp:TextBox&gt;
            &lt;/FooterTemplate&gt;
        &lt;/asp:TemplateField&gt;
        &lt;asp:TemplateField HeaderText="Edit"&gt;
            &lt;ItemTemplate&gt;
               &lt;asp:LinkButton ID="lnkEdit" runat="server" Text="Edit" CommandName="Edit" CausesValidation="false" OnClick="lnkEdit_Click"&gt;&lt;/asp:LinkButton&gt;
            &lt;/ItemTemplate&gt;
            &lt;EditItemTemplate&gt;
              &lt;asp:LinkButton ID="lnkUpdate" runat="server" Text="Update" CommandName="Update"&gt;&lt;/asp:LinkButton&gt;
              &lt;asp:LinkButton ID="lnkCancel" runat="server" Text="cancel" CommandName="Cancel"&gt;&lt;/asp:LinkButton&gt;
            &lt;/EditItemTemplate&gt;
            &lt;FooterTemplate&gt;
                &lt;asp:LinkButton ID="lnkAdd" runat="server" Text="Add" CommandName="Add" Width="90px" OnClick="lnkAdd_Click"&gt;&lt;/asp:LinkButton&gt;
            &lt;/FooterTemplate&gt;
         &lt;/asp:TemplateField&gt;
</code></pre>

<p>Thank you.
Asp.net C#</p>
