Answer:
We the help of @Register directive,we can register any User-controls in a webpage.
For ex:- We have to write @Register directive at the top of the page like below:-
<%@ Register Src="~/WebUserControl.ascx" TagName="abc" TagPrefix="uc">
Here:- WebUserControl.ascx is a User-Control name.
TagPrefix :- like an <asp: tag
TagName :- like control object
For accessing user-control,we have to write onside<body> tag
as:-
<uc:abc ID="my_user_control" runat="server" />
Asked In: Many Interviews |
Alert Moderator