I just played around with a few things, and in a new web site project, i could only use controls in the code-behind that were referenced in the aspx markup using the <%@ Reference %> tag.
The ASP namespace you imported must have been written into the control code files, it is not generated by default i dont believe. if you check a control's code that is in that namespace, then it probably has the ASP namespace declaration. The controls
that you noticed were missing probably have not had that namespace added to them yet.
Actually, i think you are right about the ASP namespace thing. I added a reference tag to a page real quick, and the class appeared in the ASP namespace.
jzimmerman20...
Member
503 Points
183 Posts
Re: Using the class of a user control in code-behind
May 22, 2009 02:41 PM|LINK
I just played around with a few things, and in a new web site project, i could only use controls in the code-behind that were referenced in the aspx markup using the <%@ Reference %> tag.
The ASP namespace you imported must have been written into the control code files, it is not generated by default i dont believe. if you check a control's code that is in that namespace, then it probably has the ASP namespace declaration. The controls that you noticed were missing probably have not had that namespace added to them yet.Actually, i think you are right about the ASP namespace thing. I added a reference tag to a page real quick, and the class appeared in the ASP namespace.