Monday, August 8, 2011

Difference between Usercontrol and Custom control

User Control
1.Web user controls are easy to make, but they can be less convenient to use.
2.Web user controls are compiled dynamically at run time they cannot be added to the Toolbox.
3.the only way to share the user control between applications is to put a separate copy in each application, which takes more maintenance if you make changes to the control.
4. If your control has a lot of static layout, a user control might make sense.
Custom Control
1.Web custom controls are compiled code, which makes them easier to use but more difficult to create.
2.Once you have created the control, however, you can add it to the Toolbox and display it in a visual designer with full Properties window support and all the other design-time features of ASP.NET server controls. In addition, you can install a single copy of the Web custom control in the global assembly cache and share it between applications, which makes maintenance easier.

2 comments:

  1. hi Sajjan
    Very well written blog indeed as it is brief but it is information rich.It clearly list out the differences between Usercontrol and Custom control which are easy to understand.Thanks
    digital certificates

    ReplyDelete