Hi
What is the difference between Custom web user control and a Custom web server control ?
Custom Web User Control and a Custom Web Server Control
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Posted May 15, 2012, 8:16 AM EDT
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 ).