.NET Tip of The Day
Learn one new .NET trick every day
Быстрое пополнение счета телефона      Login or Join

Which is better: Control or WebControl?

The System.Web.UI.Control class is the base class for all server controls. This provides the properties, methods, and events shared by all web controls. The System.Web.UI.WebControls.WebControl class derives from the Control class and adds style properties such as Font, Forecolor, and Backcolor.

Microsoft recommends:

  • if your custom control contains no user interface elements then derive from Control Class.
  • if your custom control provides a user interface, then derive from WebControl class.

submitted by Lohith Bandrehalli

10/30/2007
RSS .NET Tip of The Day
Subscribe to receive one tip from the .NET Tips and Tricks Community per day.
Previous Tips of The Day
The best of the .NET Tips & Tricks Community.
.NET Practitioners .NET Tips & Tricks Community
Every .NET practitioner has a trick up in their sleeve. This is the place to share it with other .NET people.
Submit a Tip
Discovered a new trick? Share it with others.
My Tips
Manage tips you authored.