How to change public properties of User control?
<p>I have a very simple user control in my web site project which has public property declarations as following </p>

<pre><code>    public DateTime StartDate
    {
        get
        {
            return _startDate;
        }
        set
        {
            _startDate = value;
        }
    }
    public DateTime EndDate
    {
        get
        {
            return _endDate;
        }
        set
        {
            _endDate = value;
        }
    }
</code></pre>

<p>When i drag the ascx file to one of my aspx page and when i go to code behind of aspx page i can access the controls properties through intelisense, but when i run the project through visual studio i get error "The name 'uctTest1' does not exist in the current context    " any suggetions to fix the error?</p>

<p>This is the line where Error shows when i run the project <code>uctTest.StartDate = DateTime.Now;</code></p>

<p>aspx page markup : </p>

<pre><code>&lt;%@ Page Language="C#" AutoEventWireup="true" CodeFile="removetest.aspx.cs" Inherits="removetest" %&gt;
&lt;%@ Register src="~/uctTest.ascx" tagname="testCtl" tagprefix="uc1" %&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 runat="server"&gt;
&lt;title&gt;&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;form id="form1" runat="server"&gt;
&lt;div&gt;

    &lt;uc1:testCtl ID="uctTest1" runat="server" /&gt;

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

<p>aspx page code behind : </p>

<pre><code> protected void Page_Load(object sender, EventArgs e)
{
    if (!IsPostBack) 
    {
        uctTest1.StartDate = DateTime.Now;

    }
}
protected void btnEdit_Click(object sender, EventArgs e)
{

}
</code></pre>
