How can I pass an ID to my selectcommand to filter out my records?
<p>I have this code example.  This web page would be called by another webpage that is passing an ID through the url e.g.  <code>http://localhost:49780/bookingform.aspx?passedid=8</code></p>

<p>How can I get that ID to my selectcommand to filter out my records? e.g. ProductID &lt;= passedid</p>

<p>Code:</p>

<pre><code>&lt;%@ page language="C#" %&gt;

&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
&lt;html xmlns="http://www.w3.org/1999/xhtml" &gt;
  &lt;head&gt;
    &lt;title&gt;Repeater.DataSourceID Property Example&lt;/title&gt;
&lt;/head&gt;

  &lt;body&gt;
    &lt;form id="Form1" runat="server"&gt;

      &lt;h3&gt;Repeater.DataSourceID Property Example&lt;/h3&gt;

      &lt;asp:repeater id="Repeater1"       
        datasourceid="SqlDataSource1"
        runat="server"&gt;

        &lt;headertemplate&gt;
          &lt;table border="1"&gt;
            &lt;tr&gt;
              &lt;td&gt;&lt;b&gt;Product ID&lt;/b&gt;&lt;/td&gt;
              &lt;td&gt;&lt;b&gt;Product Name&lt;/b&gt;&lt;/td&gt;
            &lt;/tr&gt;
        &lt;/headertemplate&gt;

        &lt;itemtemplate&gt;
          &lt;tr&gt;
            &lt;td&gt; &lt;%# Eval("ProductID") %&gt; &lt;/td&gt;
            &lt;td&gt; &lt;%# Eval("ProductName") %&gt; &lt;/td&gt;
          &lt;/tr&gt;
        &lt;/itemtemplate&gt;

        &lt;footertemplate&gt;
          &lt;/table&gt;
        &lt;/footertemplate&gt;
      &lt;/asp:repeater&gt;

            &lt;asp:sqldatasource id="SqlDataSource1"          
            connectionstring="&lt;%$ ConnectionStrings:NorthWindConnection%&gt;" 
        selectcommand="SELECT ProductID, ProductName FROM [Products] Where ProductID &lt;= 10"
        runat="server"&gt;
      &lt;/asp:sqldatasource&gt;

    &lt;/form&gt;      
  &lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>Regards</p>

<p>Tea</p>
