title: How to redirect to another page from gridview edit event
body: <p>I don't know am I using good approach.<br/>
  I have a view page with <code>gridview</code> and edit page.<br/>
  In gridview I have added:</p>
  
  <pre><code>...
  &lt;Columns&gt;
          &lt;asp:CommandField ShowEditButton="True" ShowDeleteButton="true"&gt;&lt;/asp:CommandField&gt;
  ...
  </code></pre>
  
  <p>And event:</p>
  
  <pre><code>OnRowEditing="rgrContact_RowEditing"
  </code></pre>
  
  <p>In event method I have tried to add:</p>
  
  <pre><code>protected void rgrContact_RowEditing(object sender, GridViewEditEventArgs e)
          {
              var id = (int)rgrContact.DataKeys[e.RowIndex].Value; 
              Response.Redirect("..." + id);
  </code></pre>
  
  <p>But there is no <code>e.RowIndex</code>.<br/>
  How to get ID of the selected row so I can pass it to edit page?<br/>
  Am I using good event?</p>