Other web controls Web Controls

263 be a member of the TextBoxMode enumeration; possible values are TextBoxMode.SingleLine the default, TextBoxMode.MultiLine , and TextBoxMode.Password . The Text property, of course, is the most important property of the control. Its value includes any carriage return and linefeed characters the vbCrLf character entered by the user if the TextMode property is set to TextBoxMode.MultiLine . In addition, if the TextMode property is set to TextBoxMode.Password , asterisks are displayed whenever the user enters a character; however, the actual string input by the user is stored as is in the Text property. Finally, the OnTextChanged attribute defines an event handler that will be executed whenever the Text property of the text box is changed. The event handler designated by the OnTextChanged attribute must have the following signature: Sub OnTextChangedMethodsender As Object, e As EventArgs

6.3.1.10 Other web controls

The remaining controls defined in the System.Web.UI.WebControls namespace are: AdRotator Displays an advertisement. The AdRotator control can be set to display a different ad each time the page is viewed. Calendar Displays a one-month calendar on the web page and allows the user to select a date. CheckBoxList Displays a group of checkboxes on the web page. CompareValidator Validates the value entered into a control by comparing it to the value in another control or to a constant value. See Sect ion 6.4 later in this chapter for more information. CustomValidator Validates the value entered into a control by running custom validation code. See Sect ion 6.4 later in this chapter for more information. DataGrid Displays the values from a data source in a table format on the web page. See Chapt er 8 for more information. DataGridItem Represents a row in the DataGrid control. DataList Displays the values from a data source in a list-control format on the web page. DataListItem 264 Represents an item in the DataList control. HyperLink Displays a link to another web page. The link can be text or an image. ImageButton Displays an image on the web page. This control differs from the Image control in that it generates a server-side event when the image is clicked. LinkButton Displays a link to another web page. The LinkButton control has the same appearance as the HyperLink control, but it has the same behavior as the Button control. Literal Displays static text on the web page. Panel Contains other controls on the web page. RadioButtonList Displays a list of radio buttons on the web page. RangeValidator Validates the value entered into a control by comparing it to a given range of values. See Sect ion 6.4 later in this chapter for more information. RegularExpressionValidator Validates the value entered into a control by matching it against a given regular expression. See Sect ion 6.4 for more information. RequiredFieldValidator Validates a value entered into a control by ensuring that the value is different from the controls original value. See Sect ion 6.4 for more information. TableHeaderCell Represents a header cell in a Table control. ValidationSummary Displays a summary of validation errors on the web page. See Sect ion 6.4 for more information. 265

6.3.2 HTML Controls