Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between User Control and Custom Control?

What are the differences between User Control and Custom Control in ASP.NET

like image 766
Ramesh Soni Avatar asked Nov 28 '25 22:11

Ramesh Soni


2 Answers

AFAIK, user controls are controls that you can create out of existing controls and can be part of the project and have a designer surface for you to drag/drop.

Custom controls are generally external to the project & would require to be hand-coded (using various asp.net control events & html building in the code).

like image 173
shahkalpesh Avatar answered Nov 30 '25 12:11

shahkalpesh


User Controls are inherit from UserControl class by system default and can combine controls in terms of specific UI case and can have UI logic as well and reuse again and again anywhere within project.

Custom Controls are inherits from Control class (that you can change any control type what you want to customize) and generally use to add extra ability to an existing UI controls.

like image 32
mtt Avatar answered Nov 30 '25 13:11

mtt



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!