asp.net reading code behind file variables
<p>I have a web form having a grid bonded to SQL data source. But the select command of the SQL data source is dynamically accepted and stored in a static class which resides in app_code file of my project. How do I set the select command of the SQL data source to this query in the app_code class?</p>

<p>I did something like this :</p>

<pre><code>&lt;script type="text/C#" runat="server" language="c#" src="ReportGenerationGrid.aspx.cs"&gt;
    SqlDataSource1.SelectCommand = ParametersRetainer.Query;
&lt;/script&gt;
</code></pre>

<p>But its not working.</p>
