A user control is a partial web page created just like any other web page in ASP.NET, except that it has a .ASCX extension and can be embedded in other ASPX pages.
User controls are registered on the web page in which they are used, for example:
<%@ Register TagPrefix="UC" TagName="TestControl" Src="test.ascx" %>
They are then advertised on the web page in which they are to be used, for example:
<UC:TestControl id="Test1" runat="server"/>
User controls are compiled code components that run on the server, expose the object model, and display markup text, such as HTML or XML, like a regular web form or user control. User controls are written in C # or VB and produced from a class
System.Web.UI.WebControls.WebControl
Server controls are controls that run on the server and display markup in the browser. User controls and user controls are examples of server controls.
http://support.microsoft.com/kb/893667
Robert Harvey Jun 14 '09 at 23:24 2009-06-14 23:24
source share