problems with user control page

Posted by Alexander on Stack Overflow See other posts from Stack Overflow or by Alexander
Published on 2010-03-30T18:37:02Z Indexed on 2010/03/31 1:43 UTC
Read the original article Hit count: 424

Filed under:
|
|
|

I am starting to give up troubleshooting this issue I had... I had an .ascx page and had the following user control in it:

<td>
                <Club:DatePicker ID="dp1" runat="server" />
</td>

however in my code behind when I tried to write methods:

 public System.DateTime startDateTime
        {
            get
            {
                return dp1.SelectedDate.Add(tp1.SelectedTime.TimeOfDay);
            }
            set
            {
                dp1.SelectedDate = value;
                tp1.SelectedTime = value;
            }
        }

It can't reference dp1(dp1 is underlined in red) as well as tp1... why is this?? I've tried to convert the solution to a web application and yet it doesn't work. Tried adding:

protected global::ClubSite dp1; protected global::ClubSite tp1;

in the ascx.designer.cs

but then the global is highlighted in red

here's the link to my full solution:

http://cid-1bd707a1bb687294.skydrive.live.com/self.aspx/.Public/Permias.zip

© Stack Overflow or respective owner

Related posts about user

Related posts about control