views:

1730

answers:

2

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

+4  A: 

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).

shahkalpesh
@shahkalpesh so user control will remain for that website only, and custom control for all other projects,i mean it can be placein tool box ami right
Surya sasidhar
@Surya: Yes. However, user control can be part of another project if all the other control (it depends on) are available in another project.
shahkalpesh
+2  A: 

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.

mtt