Server error! Check the console for details :(

June 16, 2014

User Controls

Please only implement user controls when they're going to be used in multiple locations, if the item is only going to be used on a single page then please don't make a user control for it.

Exception - forms should always be in user controls labeled form_<name>, as they are sometimes touchy and it's less likely that they'll get broken if they're in user controls and easier to spot in the project. It's also easier to maintain and review them when I do optimization passes. In addition, the controls for the form, a8b.webform(blah blah blah), should be in the user control itself, rather than on the page the form is being loaded onto.

Among other things, the way our sites on CloudFront work is that when a change to a user control or a master page is detected, CloudFront invalidates (refreshes) the content on the entire site rather than only on the single page. There's a teensy cost per page invalidation ($0.005 per page after the first 1,000), so every little bit helps.