how to use parameters in code behind to access some controls in my aspx file using C#
<p>i have 2 textbox that has a date values in my aspx file.  I would like to access these 2 controls in my select statement using code behind but i am getting error like this:
'Must declare the scalar variable "@txtStartClosingDate"
so what am i missing here in my code behind here?  thanks</p>

<pre><code> protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            MainGridView.DataSource = GetData("select   GroupCategory, Count(Status1) as TotalCount from  [MasterProject] where Closing_Date &gt;= @txtStartClosingDate and Closing_Date &lt;= @txtEndClosingDate and Status1 is not null group by  GroupCategory");
            MainGridView.DataBind();


        }
    }
</code></pre>

<p>Here is one of the textbox that i am trying to reference:</p>

<pre><code>&lt;asp:TextBox ID="txtStartClosingDate" runat="server" CssClass="datepicker"&gt;&lt;/asp:TextBox&gt;
</code></pre>
