Which Is Better: Control or WebControl?

The Control class in the System.Web.UI namespace is the base class for all server controls. It provides the properties, methods, and events shared by all web controls. The WebControl class in the System.Web.UI.WebControls namespace derives from the Control class and adds style properties such as Font, Forecolor, and Backcolor. In addition, it provides skin and theme features.

Microsoft recommends deriving from the Control class if your custom control contains no user interface elements. But if your custom control provides a user interface, you should derive from the WebControl class.

Thanks to :
ASP.NET Cookbook, 2nd Edition
By Michael A. Kittel, Geoffrey T. LeBlond
...............................................
Publisher: O'Reilly
Pub Date: December 2005
Print ISBN-10: 0-596-10064-7
Print ISBN-13: 978-0-59-610064-3
Pages: 1014

No comments: