Any control in ASP.NET is a class and therefore an object (because all classes derive from the .NET System.Object class). ASP.NET controls are all derived from System.Web.UI.Control, even the Page itself.
When you want to use a control (custom or otherwise) you use control tags:
<asp:button ...>
It happens that the ASP.NET runtime automatically knows about the XML namespace "ASP" which is an alias for System.Web.UI.WebControls. Regular HTML tags (<input type="button"...>) live in the System.Web.UI.HtmlControls namespace and ASP.NET knows they are declared as regular HTML (no tag prefix).
When you want to use a custom control (user control from an ASCX or a custom server control found in a third party assembly) you need to tell ASP.NET how you are going to refer to it. That is what the @ Register directive is for. In the case of your situation:
<%@ Register TagPrefix="uc1" ... %>
You are telling ASP.NET: I am going to use the tag prefix "uc1" and here is where you can find the source for the control(s) under that prefix.
You can register both a single ASCX:
<%@ Register TagPrefix="uc1" TagName="aControl" Src="aControl.ascx" %>
where the Src attribute tells you where the ASCX can be found, or you can register a tag namespace when you have 1 or more server controls in an referenced assembly:
<%@ Register TagPrefix="ms" NameSpace="Microsoft.Web.UI.WebControls" Assembly="Microsoft.Web.UI.WebControls" %>
Here's the MSDN article on the register directive:
http://msdn.microsoft.com/library/en...onregister.asp
-
Peter