How to embed variable value in sqldatasource session parameter in c#
<p>I want to question how to embed variable value in sqldatasource session parameter in c#. This is mycode:</p>

<p>default.aspx:</p>

<pre><code>&lt;asp:SqlDataSource ID="SqlDataSource1" runat="server" 
    ConnectionString="&lt;%$ ConnectionStrings:Ora2011 %&gt;" 
    ProviderName="&lt;%$ ConnectionStrings:Ora2011.ProviderName %&gt;" 
    SelectCommand="SELECT ID, CATEGORY_NAME FROM (:INVENT_CATEGORY)"&gt; 
    &lt;SelectParameters&gt;
        &lt;asp:SessionParameter Name="INVENT_CATEGORY" SessionField="INVENT_CATEGORY" Type="String" /&gt;
    &lt;/SelectParameters&gt;     
&lt;/asp:SqlDataSource&gt;
</code></pre>

<p>C#:</p>

<pre><code>protected void Page_Load(object sender, EventArgs e)
{
    string table = "V_INVENTORY"
    Session["INVENT_CATEGORY"] = table;
}
</code></pre>

<p>When i run this program, i get error "invalid table name". Why i can't embed variable into sqldatasource from session parameter. Thanks for your help</p>
