HtmlControls

The HtmlControls all inherit from System.Web.UI.HtmlControls.HtmlControl, and are the most basic server controls in the Framework. Any HTML tag can be made into an HtmlControl simply by adding runat="server" to it. There are about a dozen HtmlControls that have specific behavior, and thus have their own subclassed classes to describe them. Any other control is created as an HtmlGenericControl class. Figure 5.1 demonstrates the class hierarchy for the HtmlControls.

Figure 5.1. HtmlControls class hierarchy.

HtmlControl Properties and Methods

Because all HtmlControls inherit from the System.Web.UI.HtmlControls.HtmlControl class, its properties ...

Get ASP.NET by Example now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.