ASP .NET Web Developer's Guide

Using ASP.NET Web Controls

The ASP.NET Web controls are also known as Web form controls. Microsoft has included a plethora of Web controls in the System.Web.UI.WebControls namespace. For discussion purposes, we will divide these controls into three major categories:

  • Basic Web Controls These Web controls are similar to HTML server controls but have additional features. These controls have a richer and more consistent object model.

  • Validation Controls These controls have been developed exclusively for input validation (to be discussed later in this chapter).

  • Databound ListControls These belong to the new generation of controls that provide additional power and development speed. These are also typically referred to as Templated Web Controls.

All Web controls are derived from the generic class named WebControl. Thus, the Web controls inherit a common set of class members. Some of the frequently used members include BackColor, BorderColor, BorderStyle BorderWidth, DataBind, Enabled, Font, ForeColor, Height, Page, Parent, Site, TabIndex, ToolTip, Visible, Init, Load, Unload, Dispose, ToString, OnInit, OnLoad, and OnDataBinding.

Basic Web Controls

Table 3.2 briefly describes several server controls that we have classified as basic Web controls. Some of these controls behave similarly. For example, the usages and characteristics of a CheckBoxList control are almost identical to those of a RadioButtonList control. This is why we have grouped these controls under single captions in Table 3.2.

Table 3.2: Basic Server Controls

Server Control

Characteristics

Label

A Label is used to display text. If we want to display static...

UNLIMITED FREE
ACCESS
TO THE WORLD'S BEST IDEAS

SUBMIT
Already a GlobalSpec user? Log in.

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.

Customize Your GlobalSpec Experience

Category: Slitters and Slitting Equipment
Finish!
Privacy Policy

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.