Implement a Web User Control in Web form using 2 steps

Chikul
Posted by Chikul under ASP.NET category on | Views : 1956
We can implement a Web User Control in form using 2 steps.

Step 1 : Add a "<%@ Register %>" tag in your aspx page.


<%@ Register TagPrefix="UC" TagName="UserControl" Src="~/WebUserControl.ascx" %>


Step 2 : Write the following code on Body part .

<body>
<form id="form1" runat="server">
<UC:UserControl id="UC1" runat="server"></UC:UserControl>
</form>
</body>


At the time of execution it'll include the page deatils as well as Web User Control Codes also.


Regards,
Chikul

Comments or Responses

Login to post response