title: Get Gridview Row Index
body: <p>I am using the below code to get the row index </p>
  
  <pre><code>protected void gvESAPending_RowCommand(object sender, GridViewCommandEventArgs e)
  
      {
          try
          {
              lblMsg.Text = "";
              int index = Convert.ToInt32(e.CommandArgument);
              GridViewRow row = gvESAPending.Rows[index]; // Here incorrect format error is coming
          }
       }
  </code></pre>
  
  <p>But the index value is coming as 0. What is wrong here?</p>
  
  <p>Aspx Code </p>
  
  <p>
                                      
                                          
                                          
                                          
                                          
                                          
                                          
                                          
                                              
                                          
                                          
                                              
                                          
                                          
                                              
                                                  '>
                                              
                                          
                                          
                                              
                                                  '>
                                              
                                          
                                      
                                  </p>