Register directive is a directive used for registering a user defined control on a web page.
A user control may be embedded in an aspx web page using the @Register directive. A user control cannot be executed on its own independently, but it may be registered
on a web page and then used.
Syntax for registering a user control --
<%@ Register TagPrefix="UC1" TagName="UserControl1" Src="AddEmployeeControl.ascx" %>
TagPrefix attribute is used to specify a unique namespace for the user control.
TagName is used to refer a user control uniquely by its name.
When we want to use this control in a webpage, we may use the following line of code --
<UC1:UserControl1 runat="server" />
Please mark as answer if it solves your query.Maheshvishnu, if this helps please login to Mark As Answer. | Alert Moderator