Top ASP.NET Items

Tip/Trick: How to Register User Controls and Custom Controls in Web.config

I've been including this technique in my ASP.NET Tips/Tricks talks the last year, but given how many people are always surprised by its existence I thought it was worth a dedicated tip/trick post to raise the visibility of it ( click here to read other posts in my ASP.NET Tips/Tricks series). Problem: In previous versions of ASP.NET developers imported and used both custom server controls and user controls on a page by adding <%@ Register %> directives to the top of pages like so: < %@ Register TagPrefix ="scott" TagName ="header" Src ="Controls/Header.ascx" % > < %@ Register TagPrefix ="scott" TagName ="footer" Src ="Controls/Footer.ascx" % > < %@ Register TagPrefix ="ControlVendor" Assembly ="ControlVendor" % > < Read More...

Read the complete post at http://weblogs.asp.net/scottgu/archive/2006/11/26/tip-trick-how-to-register-user-controls-and-custom-controls-in-web-config.aspx