How to register user controls in aspX page
<%@ Register Src="ListPicker.ascx" TagName="ListPicker"
TagPRefix="uc1" %>
Register user control in Web.config
<controls>
<add tagPrefix="scottgu" src="~/Controls/Header.ascx" tagName="header"/>
</controls>
How to register custom controls in ASPX pages
<%@ Register TagPrefix="aspSample" Namespace="Samples.AspNet.CS.Controls"%> Method to register custom controls in Web.config <controls> <add tagPrefix="aspSample" namespace="Samples.AspNet. CS.Controls"> </add> </controls>If the assembly attribute is missing, asp.net infers that the assembly is dynamically compiled from source files in the App_Code directory. Adding a Custom Control to the Toolbox You cannot add a control to the Visual Designer's toolbox without compiling the control into an assembly. Then right-click "Toolbox" - "Select Items" - browse to find the DLL file to add and click OK to complete the addition. [assembly: TagPrefix("Samples.AspNet.CS.Controls", "aspSample")] Use this attribute to specify a custom control class. When dragging and dropping controls from the toolbox, the specified tag prefix <controls> will be generated by default.
<add tagPrefix="aspSample"
namespace="Samples.AspNet.CS.Controls"
assembly="Samples.AspNet.CS.Controls">
</add>
</controls>
refer to:
http://msdn.microsoft.com/zh-cn/library/yhzc935f(VS.80).aspx
Develop custom controls: http://msdn.microsoft.com/zh-cn/library/yhzc935f(VS.80).aspx User controls: http://msdn.microsoft.com/zh-cn/library/y6wb1a0e. aspx
-