Hi
What is the difference between Custom web user control and a Custom web server control ?
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Posted May 15, 2012, 12:16 PM
Easy to implement because you can visually drag & drop other controls on the markup part.
Good designer support in Visual Studio
Can only be reused in the same project
You can also create templated user controls if you want (though not so commonly used) UserControl need *.ascx file to complete the instance initialization. Therefor you can not derive one UserControl from another. UserControl has *.ascx file, so you can easy write a HTML. And ( the most advantage ) you can change content *.ascx of file, and change the look of control in run-time of web application.
Custom Controls (.dll file)
Harder to create but there's a whole variety of possible scenarios:
Inherit from existing controls like Label, Button, ...
Create a composite control
Make templated, + databound, controls
Great reusability in other projects
Ideal to make frameworks that can be used company wide
WebControl is "only" class in assembly, so you can derive another control from them. WebControl has no *.ascx ( or another ) file, co nobody can not change the look of this control ( unqualified web admins for example ).