I’d like to hear some reasons for using a ServerControl opposed to a UserControl. I’ve found that I probably overuse UserControls.
My list looks something like this:
Pro UserControl
- Easily modified. Need to add a class attribute to an element, hack it out in html.
- Quick and easy to create initial view. Everyone can write simple html right?
Pro ServerControl
- Performance. No html parsing.
- Flexibility. Control rendering down to a gnat’s behind.
- Reusability. Compile it and stick it in the GAC for later use. Or, sell it.
Anything that I’m missing?
The following two advantages of server controls come to mind:
However, user controls do have an additional edge because they’re templated: