title: How to get value from DetailsView Control in ASP.NET?
body: <p>I have DetailsView on my page. I set <code>DefaultMode="Edit"</code>. Now i want to get value that user will edit in this cell.</p>
  
  <pre><code>&lt;asp:DetailsView ID="dvApplicantDetails" runat="server" 
              AutoGenerateRows="false" DataKeyNames="ApplicantID" DefaultMode="Edit" 
              onitemcommand="dvApplicantDetails_ItemCommand" &gt;
          &lt;Fields&gt;
              &lt;asp:BoundField DataField="ApplicantID" HeaderText="ApplicantID" ReadOnly="true"/&gt;
              &lt;asp:BoundField DataField="FirstName" HeaderText="First Name" /&gt;
              &lt;asp:BoundField DataField="LastName" HeaderText="Last Name" /&gt;
  
              &lt;asp:CommandField ButtonType="Button" ShowEditButton="true" EditText="Update" ShowCancelButton="false" /&gt;
          &lt;/Fields&gt;
          &lt;/asp:DetailsView&gt;
  </code></pre>
  
  <p>I've tried many ways to get this value, such as:</p>
  
  <pre><code>protected void dvApplicantDetails_ItemCommand(object sender, DetailsViewCommandEventArgs e)
  {
      if (e.CommandName == "Update")
      {
          string firstName = dvApplicantDetails.Rows[1].Cells[1].Text;
          string lastName = dvApplicantDetails.Rows[2].Cells[1].Text;
      }
  }
  </code></pre>
  
  <p>But it doesn't work... How to get this value using this mode. I know that i can use <code>&lt;ItemTemplate&gt;</code> instead of <code>&lt;BoundField&gt;</code>, but anyway it should be some way to get this value from this field. 
  Help please!
  Thank you!</p>