title: Gridview Data Update by textbox
body: <p>When am trying to update Datagridview with a textbox value it shows empty value in textbox
  my code is this.wt's wrong in this. bnddata() has dataset assign to gridview</p>
  
  <pre><code>protected void GridView1_RowEditing(object sender, GridViewEditEventArgs e)
      {
          GridView1.EditIndex = e.NewEditIndex;
          bnddata();
  
      }
      protected void GridView1_RowUpdating(object sender, GridViewUpdateEventArgs e)
      {
          GridViewRow row = (GridViewRow)GridView1.Rows[e.RowIndex];
  
  
          string emailid = GridView1.Rows[0].Cells[0].Text;
  
  
          TextBox txtadress = (TextBox)row.FindControl("txtadress");
  
          con.Open();
  
          string upd = "update empeasty set adress='" + txtadress.Text+ "' where emailid='"+emailid+"'";
  
          SqlCommand cmd = new SqlCommand(upd,con);
  
  
          int i=cmd.ExecuteNonQuery();
  
          if (i &gt; 0)
              Response.Write("Data updated");
          else
              Response.Write("Data not updated");
  
          con.Close();
  
          GridView1.EditIndex = -1;
  
          bnddata();
  }
  </code></pre>