title: I can't get the value of textbox from the footer row of gridview
body: <p>i can't get the value of textbox from the footer row of gridview</p>
  
  <pre><code>    &lt;asp:GridView ID="GridView1" runat="server" Width="1214px"       
              AutoGenerateColumns="False" ShowFooter="true" 
   OnRowCommand="GridView1_RowCommand"                                  
    &lt;Columns&gt;
   &lt;asp:TemplateField HeaderText="Insert"&gt;
              &lt;/asp:TemplateField&gt;
              &lt;asp:TemplateField HeaderText="Student Name"&gt;
              &lt;EditItemTemplate&gt;
                 &lt;asp:Label ID="lblEditSName" runat="server" Text='&lt;%#Eval("sname") %&gt;'/&gt;
              &lt;/EditItemTemplate&gt;
              &lt;ItemTemplate&gt;
                  &lt;asp:Label ID="lblSName" runat="server" Text='&lt;%#Eval("sname") %&gt;' /&gt;
              &lt;/ItemTemplate&gt;
              &lt;FooterTemplate&gt;
                  &lt;asp:TextBox ID="txtSName" runat="server"/&gt;
              &lt;/FooterTemplate&gt;
              &lt;/asp:TemplateField&gt;
              &lt;/Columns&gt;
          &lt;/asp:GridView&gt;
  </code></pre>
  
  <p>and the code behind is........
  i can't get the value of textbox from the footer row of gridview</p>
  
  <pre><code>protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
  {
      if (e.CommandName==("AddNew"))
      {
          TextBox txtName =(TextBox) GridView1.FooterRow.FindControl("txtSName");
  string strName=txtName.Text;   //strName is Empty while i m enters data into the  textbox txtSName
       }
  </code></pre>