title: How to get GridView values from asp:BoundField?
body: <p>I have a <code>GridView</code> that retrieves values from a <code>DataSource</code> that joins two tables, and I need to get those values in the code-behind and pass them as a <code>String</code>. Any ideas on what would be the best approach? Below is my <code>GridView</code> in aspx:</p>
  
  <pre><code>&lt;asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
          DataSourceID="SqlDsPoNumber" EnableModelValidation="True" Visible="True" 
          DataKeyNames="PO_NUMBER,SITE_NAME"&gt;
          &lt;Columns&gt;
              &lt;asp:BoundField DataField="PO_NUMBER" HeaderText="PO_NUMBER" 
                  SortExpression="PO_NUMBER" /&gt;
              &lt;asp:BoundField DataField="SITE_NAME" HeaderText="SITE_NAME" 
                  SortExpression="SITE_NAME" /&gt;
          &lt;/Columns&gt;
  &lt;/asp:GridView&gt;
  </code></pre>