Implement a Web User Control in Web form using 2 steps

Posted by Chikul under ASP.NET category on | Views : 1921
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 .

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

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


Comments or Responses

Login to post response