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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.