Briefly explain what user controls are and what server controls are and the differences between the two.

Showing Answers 1 - 2 of 2 Answers

Sasidar

  • Jul 11th, 2005
 

An ASP.NET control (sometimes called a server control) is a server-side component that is shipped with .NET Framework. A server control is a compiled DLL file and cannot be edited. It can, however, be manipulated through its public properties at design-time or runtime. It is possible to build a custom server control (sometimes called a custom control or composite control). (We will build these in part 2 of this article.)  
 
In contrast, a user control will consist of previously built server controls (called constituent controls when used within a user control). It has an interface that can be completely edited and changed. It can be manipulated at design-time and runtime via properties that you are responsible for creating. While there will be a multitude of controls for every possible function built by third-party vendors for ASP.NET, they will exist in the form of compiled server controls, as mentioned above. Custom server controls may be the .NET answer to ActiveX Web controls.  
 

  Was this answer useful?  Yes

samiksc

  • Jan 16th, 2006
 

A server side control is a built in control provided by .Net framework class libraries. This control may be placed on a web form and all its events are handled on the server.

A user control is a .ascx file created by a developer, to combine built in controls to form a new control which will be required frequently for a web site developement. This file contains a '@control' directive at the top. This file can be included in other .aspx files using @Register directive.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions