Learning Curve…

Differences between user controls and custom controls?

Posted on: November 2, 2011

Factors User control Custom control
Deployment Designed for single-application scenarios

Deployed in the source form (.ascx) along with the source code of the application

If the same control needs to be used in more than one application, it introduces redundancy and maintenance problems

Designed so that it can be used by more than one application

Deployed either in the application’s Bin directory or in the global assembly cache

Distributed easily and without problems associated with redundancy and maintenance

Creation Creation is similar to the way Web Forms pages are created; well-suited for rapid application development (RAD) Writing involves lots of code because there is no designer support
Content A much better choice when you need static content within a fixed layout, for example, when you make headers and footers More suited for when an application requires dynamic content to be displayed; can be reused across an application, for example, for a data bound table control with dynamic rows
Design Writing doesn’t require much application designing because they are authored at design time and mostly contain static data Writing from scratch requires a good understanding of the control’s life cycle and the order in which events execute, which is normally taken care of in user controls
Compilation Compiled at runtime Precompiled
ToolBox Cannot be added to the ToolBox Can be added to the ToolBox (using drag and drop)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Learning days (Calendar)

November 2011
« Oct   Dec »

Knowledge Bank (Archives)

I am on Twitter

Blog Stats

  • 571,090 hits

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 43 other followers

%d bloggers like this: