Just another WordPress.com weblog

User Control:

  • User Controls (.ascx) derived from System.Web.UI.UserControl
  • Designed for single-application
  • Deployed as .ASCX and source code of the application
  • If the same control needs to be used in more than one application, it introduces redundancy and maintenance problems
  • We have to use within the application and it rests in the application directory.

Eg:A much better choice when you need static content within a fixed layout, for example, when you make headers and footers

Custom Control:

  • Custom controls derived from System.Web.UI.WebControls.WebControl or System.Web.UI.Controls
  • 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
  • we can keep it in the Toolbox and use it whenever we want

 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


Comments on: "User Control vs Custom Control in .NET" (1)

  1. Deepak Samuel said:

    what is the difference between web server & web user control?I’m confused in that..could you help me please..

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

Tag Cloud

%d bloggers like this: