Reputation: 20803
I would like to put user controls on pages without registering the tag at the top of the page. For example:
<p>some text</p>
<myname:mycontrol runat="server" />
Is this possible? I've heard that tag declarations can be done in web.config... is this true?
If so, any idea which .NET framework versions support this?
Thanks
Upvotes: 1
Views: 105
Reputation: 45392
in .net 2.0 web.config :
<pages>
<controls>
<add tagPrefix="MYPREFIX" namespace=="MyNamespace.Stuff" assembly="MyAssembly" />
Much more thorough discussion http://weblogs.asp.net/scottgu/archive/2006/11/26/tip-trick-how-to-register-user-controls-and-custom-controls-in-web-config.aspx
Upvotes: 5