title: Using values from SqlDataSource in code behind
body: <p>After the <code>SQLDataSource</code> gets the values from the database, I want to be able to use these values in the code behind.  Kindly spare 5 minutes and give me some suggestions.</p>
  
  <p>ASPX Markup:</p>
  
  <pre><code>&lt;h2 id="pageHeader" runat="server"&gt;&lt;/h2&gt;
              &lt;div id="pageContent" runat="server"&gt;
  
              &lt;/div&gt; 
  
  &lt;asp:SqlDataSource ID="SqlDataSource1" runat="server" 
          ConnectionString="&lt;%$ ConnectionStrings:mkkConnectionString %&gt;" 
          SelectCommand="SELECT [PageHeader], [PageContent] FROM [PageKeeper] WHERE ([PageName] = @PageName)"&gt;
          &lt;SelectParameters&gt;
              &lt;asp:QueryStringParameter DefaultValue="AboutUs" Name="PageName" 
                  QueryStringField="Page" Type="String" /&gt;
          &lt;/SelectParameters&gt;
      &lt;/asp:SqlDataSource&gt;
  </code></pre>
  
  <p>Code behind:</p>
  
  <pre><code>Public Sub loadContent(ByVal _PageName As String)
  pageHeader.InnerText= "How do i get the value from SQLDatasource ??"
  pageContent.InnerHtml="How do i get the value from SQLDatasource ??"
  End Sub
  </code></pre>