title: Get Cell Value in C# Gridview when Button clicked on row
body: <p>I have a gridviewMain. Whenever I click the CLOSE linkbutton for row 1 I want to get the value aa. Click Close on row 2 get the value of bb. Any ideas.</p>
  
  <pre><code>A    B   C  
  aa  xx   3  CLOSE 
  bb  yy   4  CLOSE
  cc  zz   5  CLOSE
  </code></pre>
  
  <p>aspx</p>
  
  <pre><code> &lt;asp:BoundField DataField="afield" HeaderText="A" 
       SortExpression="afield" &gt;
      &lt;ItemStyle HorizontalAlign="Center" /&gt;
   &lt;/asp:BoundField&gt;
   &lt;asp:BoundField DataField="bfield" HeaderText="B" SortExpression="cfield" &gt;
       &lt;ItemStyle HorizontalAlign="Center" /&gt;
    &lt;/asp:BoundField&gt;
    &lt;asp:BoundField DataField="cfield" HeaderText="C" SortExpression="cfield" &gt;
       &lt;ItemStyle HorizontalAlign="Center" /&gt;
     &lt;/asp:BoundField&gt;
   &lt;asp:TemplateField ShowHeader="False"&gt;
  
         &lt;ItemTemplate&gt;
            &lt;asp:LinkButton ID="lbClose" runat="server" CausesValidation="False"  CommandName="CloseClicked" Text="Close"&gt;&lt;/asp:LinkButton&gt;
  
          &lt;/ItemTemplate&gt;
  
                      &lt;/asp:TemplateField&gt;
  </code></pre>