Saturday, June 30, 2007 STOP! This is an old post. Are you sure it's still relevant?

Declare ASP.NET Controls in web.config Instead of Individual Pages

Instead of declaring controls on individual ASPX pages, declare them once in web.config.

<system.web>
<pages>
<controls>
<add tagPrefix="myCompany" src="~/ctl/usercontrol.ascx" tagName="MyControl"/>
<add tagPrefix="otherCompany" assembly="OtherControlAssembly"/>
</controls>
</pages>
</system.web>

No comments: