Chapter 5. ASP.NET Server Controls

Controls provide the familiar elements of a graphical user interface (GUI): buttons, drop-down boxes, checkboxes, etc. Server controls are controls that allow server-side processing. They provide a range of functionality -- from simple data entry to complex data validation.

ASP.NET ships with a suite of server controls you can use to develop powerful Web Forms pages. A key component of the ASP.NET development model, these server controls abstract significant amounts of programming logic into simple-to-use tags. Server controls make it easy to separate programmatic logic from UI elements using code-behind. In ASP.NET, it’s easy for developers to create their own controls from scratch or to build on the functionality of existing controls by creating user controls that combine HTML, server controls and other page elements, or by creating their own custom server controls. We’ll discuss both techniques in Chapter 6.

ASP.NET Server Controls are classified as either HTMLcontrols or webcontrols. The current chapter summarizes the standard controls and the various methods for creating and modifying them.

HTML Controls

The HTML controls have a one-to-one mapping with HTML tags. You can create HTML controls and change their appearance by modifying their properties. HTML controls have an object model that closely resembles the HTML syntax of the elements, as well as the Dynamic HTML (DHTML) object model.

The attributes of an HTML tag correspond to the properties ...

Get ASP.NET in a Nutshell now with O’Reilly online learning.

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