ASP. NET page to add user controls

  • 2020-12-16 05:54:55
  • OfStack

1: Add registration control in the foreground of the page
 
<%@ Register Src="~/Controls/IndexTop.ascx" TagName="IndexTop" TagPrefix="uc_top" %> 

2: Add the content of the control where it is needed on the page
 
<uc_top:IndexTop ID="IndexTop1" runat="server" /> 

3: New user control IndexTop.ascx

Related articles: