Custom Controls are controls created by the
developer. Custom controls are actually compiled controls that act ,from the
client perspective much like asp controls. Custom controls can be derived in two
ways. To write a custom control ,firstly you derive the new class from the
System.Web.UI.Control class or from the System.Web.UI.WebControls.WebControl
class. It entirely depends on you to choose the base class.
- You can choose the base class
System.Web.UI.Control if you want the control to render non visual elements.
- You can choose the base class
System.Web.UI.WebControls.WebControl if you want to render HTML that
generates a visual interface on the client computer.
The basic difference between the two base
classes is that Control class provide the basic functionality by which you can
place it in the Control free for a page class and the WebControl adds the
functionality to the base Control.