Register Controls via Web.Config

I had a conversation with ScottW about this about a year ago (almost exactly, from Iraq, no less), and yet I still keep forgetting this technique every time I need it. So I’m blogging it myself this time just to try to keep it in my (online) memory bank.

NOTE TO SELF: IF YOU WANT TO USE CONTROLS FROM APP_CODE IN A PAGE YOU NEED TO DEFINE THE REFERENCE IN WEB.CONFIG, NOT IN A <%@ Register %>BLOCK.

Here’s a sample:

Observant readers may notice that I’m playing with Post-Cache Substitution at the moment, along with some samples from Nikhil Kothari, found here.

If you liked this post, consider subscribing to email updates about my new posts, or sharing it on Hacker News.

Keyboard shortcuts

?
Show this help
Esc
Close this help or an open menu
n
Next (newer) post: Two Kinds of Writing
p
Previous (older) post: Working on Caching Presentation
Tab
Move between links and buttons (Shift+Tab to go back)