if you add a directive like below, you can access the usercontrol class' public members and the class it self by typing its name, otherwise the compiler generates an error indicating that referenced member is not found.

<% @ Reference Control ="~/WebUserControl.ascx" %>

http://msdn.microsoft.com/en-us/library/w70c655a.aspx

Indicates that another user control, page source file, or arbitrary file located at some virtual path should be dynamically compiled and linked against the current ASP.NET file (Web page, user control, or master page) in which this directive is declared.

Just like you use "using ...." so definitions for a class can be found. You have to point the compiler to definitions.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.