Reputation: 12685
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
Pro ServerControl
Anything that I'm missing?
Upvotes: 3
Views: 1332
Reputation: 15555
The following two advantages of server controls come to mind:
However, user controls do have an additional edge because they're templated:
Upvotes: 5
Reputation: 416149
One other consideration is whether you want visual studio designer support at the time you're building the control or at the time you're using the control on the page. It really irks me that you only get one or the other, but not both.
Upvotes: 2
Reputation: 85685
Performance. No html parsing
I wouldn't expect that to be much of a runtime difference - the .ascx should get compiled on first use as well. Perhaps there's some slight overhead saved by not checking the file for modifications - but I can't think of much else.
Upvotes: 1