title: datalist not taking value on updatecommand
body: <p>I have following code:</p>
  
  <pre><code>       protected void Page_Load(object sender, System.EventArgs e)
          {
              if (!IsPostBack) {
                  bindList();
              }
          }
  
      protected void dlAgents_EditCommand(object source, System.Web.UI.WebControls.DataListCommandEventArgs e)
      {
          dlAgents.EditItemIndex = e.Item.ItemIndex;
          bindList();
      }
  
  protected void dlAgents_ItemDataBound(object sender, System.Web.UI.WebControls.DataListItemEventArgs e)
  {
      if (e.Item.ItemType == ListItemType.AlternatingItem | e.Item.ItemType == ListItemType.Item) {
          ((Label)e.Item.FindControl("lblName")).Text = e.Item.DataItem("AgentName");
          ((Label)e.Item.FindControl("lblAddress")).Text = e.Item.DataItem("Address");
          ((Label)e.Item.FindControl("lblContactNo")).Text = e.Item.DataItem("ContactNo");
          ((LinkButton)e.Item.FindControl("lnkLoginID")).Text = e.Item.DataItem("LoginEmailID");
      }
  }
  
  protected void dlAgents_UpdateCommand(object source, System.Web.UI.WebControls.DataListCommandEventArgs e)
  {
  
  
      GC.ExecuteCommand("update AgentMaster set Address='" + ((TextBox)e.Item.FindControl("txtAddress")).Text + "' , ContactNo='" + ((TextBox)e.Item.FindControl("txtContact")).Text + "' where agentid='" + e.CommandArgument + "'");
      dlAgents.EditItemIndex = -1;
      bindList();
  }
  </code></pre>
  
  <p>In this code, for updatecommand, its always taking blank value for textboxes .. eg. <code>(TextBox)e.Item.FindControl("txtAddress")).Text</code> this textbox is blank, thats why not able to update with proper values.</p>
  
  <p>Please help me.</p>