Web config entry would look like:
<configuration>
<system.web>
<pages>
<controls>
<add tagPrefix="MyControl" src="~/Controls/WebUserControl.ascx" tagName="MyBtn/>
controls>
pages>
system.web>
configuration>
Once the web config entry is made. The control can then be used in any page like this:
<body>
<form id="form1" runat="server">
<MyControl:MyBtn ID="MyUserControl" runat="server" />
form>
body>
No comments:
Post a Comment