title: Why does GridView Rowupdating event not capture the new values of textbox?
body: <p>I am using a gridview. When I click on the edit button the update and cancel button appear.
  Upon modifying the values in textbox which come from EditItemTemplate , the new values dont show in the event handler rowupdating(), instead I get the values which appear when the page was rendered. How do I grab the new values from these textboxes and proceed further?
  Here is the code.</p>
  
  <pre><code>&lt;asp:GridView ID="GridView1" runat="server" AutoGenerateEditButton="true" AutoGenerateColumns="false" 
          AutoGenerateDeleteButton="true" onrowediting="GridView1_RowEditing" 
          onrowupdating="GridView1_RowUpdating"&gt;
      &lt;Columns&gt;
  
  
      &lt;asp:TemplateField&gt;
      &lt;ItemTemplate&gt;
          &lt;asp:Label ID="lblId" runat="server" Text='&lt;%# Eval("id") %&gt;'&gt;&lt;/asp:Label&gt;
      &lt;/ItemTemplate&gt;
      &lt;EditItemTemplate&gt;
          &lt;asp:TextBox ID="txtId" runat="server" Text='&lt;%# Eval("id") %&gt;'&gt;&lt;/asp:TextBox&gt;
      &lt;/EditItemTemplate&gt;
      &lt;/asp:TemplateField&gt;
  
      &lt;asp:TemplateField&gt;
      &lt;ItemTemplate&gt;
          &lt;asp:Label ID="lblName" runat="server" Text='&lt;%# Eval("cpuname") %&gt;'&gt;&lt;/asp:Label&gt;
      &lt;/ItemTemplate&gt;
      &lt;EditItemTemplate&gt;
          &lt;asp:TextBox ID="txtName" runat="server" Text='&lt;%# Eval("cpuname") %&gt;'&gt;&lt;/asp:TextBox&gt;
      &lt;/EditItemTemplate&gt;
      &lt;/asp:TemplateField&gt;
  
      &lt;asp:TemplateField&gt;
      &lt;ItemTemplate&gt;
          &lt;asp:Label ID="lblStatus" runat="server" Text='&lt;%# Eval("status") %&gt;'&gt;&lt;/asp:Label&gt;
      &lt;/ItemTemplate&gt;
      &lt;EditItemTemplate&gt; 
        &lt;asp:TextBox ID="txtStatus" runat="server" Text='&lt;%# Eval("status") %&gt;'&gt;&lt;/asp:TextBox&gt;
       &lt;/EditItemTemplate&gt;
      &lt;/asp:TemplateField&gt;
  
      &lt;/Columns&gt;
  
  
  &lt;/asp:GridView&gt;
  
  
  protected void GridView1_RowEditing(object sender, GridViewEditEventArgs e)
          {
              GridView1.EditIndex = e.NewEditIndex;
          }
  
          protected void GridView1_RowUpdating(object sender, GridViewUpdateEventArgs e)
          {
              TextBox text = (TextBox)GridView1.Rows[e.RowIndex].FindControl("txtName");
          }
  </code></pre>