Total Pageviews

12/28/2009

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:
1. if your custom control contains no user interface elements then derive from Control Class.
2. if your custom control provides a user interface, then derive from WebControl class.

0 comments:

Post a Comment

Twitter Delicious Facebook Digg Stumbleupon Favorites More

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | Affiliate Network Reviews