Chapter 4. Controls
Controls are the
building blocks of a graphical user interface
(GUI). Familiar controls include buttons, checkboxes, list boxes, and
so forth. Controls can provide a means for a user to indicate a
preference, enter data, or make selections.
There are five types of web controls (each but the first will be
covered in detail in this and coming chapters). They are:
- HTML controls
original controls available to any HTML page. These all work in
ASP.NET exactly as they work in other web pages. HTML controls will
be used where appropriate in this book, but will not be discussed in
detail. For a good resource on HTML controls, see HTML: The
Definitive Guide, Second Edition,
Chuck Musciano and Bill
- HTML server controls
Based on original HTML controls, but
enhanced to enable server-side processing.
- Web (ASP) server controls
Server-side controls providing the
same functionality as HTML server controls but integrated into the
ASP.NET programming model.
- Validation controls
a full range of built-in form validation capability. Chapter 8 discusses validation controls.
- User controls and custom controls
created by the developer. Chapter 14 discusses user and custom controls.
HTML server controls and ASP controls both offer significant
improvements over the old-style HTML controls. These include:
The ability to automatically maintain state, discussed in detail in
ASP.NET detects the level of the target browser.
DHTML browsers are sent script for client-side processing. On
downlevel standard browsers, all processing is done on the server.
The appropriate HTML is generated for each browser.
Use of a compiled language instead of interpreted script, resulting
in better performance.
The ability to bind HTML server controls and ASP controls to a data
source (as discussed in Chapter 9).