Appendix C. Web Control Reference


This quick reference includes a list of the important properties, methods , and events for each Web control. At the end of the reference, the formatting properties of the base Web Control, TableStyle , and TableItemStyle classes are listed.

Table . AdRotator Control Properties, Methods, and Events

Properties

Description

AdvertisementFile

Specifies the path to an XML file that contains a list of banner advertisements to display.

KeywordFilter

Returns only those banner advertisements that match the filter when this property is set.

Target

Displays the page in this window or frame when you click the banner advertisement. Possible values are top , new , child , self , parent , and blank .

Methods

Description

OnAdCreated

Raises the AdCreated event.

Events

Description

AdCreated

Raised after an advertisement is retrieved from the advertisement file and before the banner advertisement is rendered.

NOTE

See Chapter 4, "Advanced Control Programming," for more information.


Table . Button Properties, Methods, and Events

Properties

Description

CausesValidation

Does not validate the form submitted by the button when False . The default value is True .

CommandArgument

Passes this value to the Command event when the button is clicked.

CommandName

Passes this value to the Command event when the button is clicked.

Text

Gets or sets the text displayed on the button.

Methods

Description

OnClick

Raises the Click event.

OnCommand

Raises the Command event.

Events

Description

Click

Raised when the button is clicked and the form containing the button is submitted to the server.

Command

Also raised when the button is clicked. However, the values of the CommandName and CommandArgument properties are passed with this event.

NOTE

See Chapter 2, "Building Forms with Web Server Controls," for more information.


Table . Calendar Properties, Methods, and Events

Properties

Description

CellPadding

Specifies the number of pixels between the contents of a cell and its border.

CellSpacing

Specifies the number of pixels between cells .

DayHeaderStyle

Specifies the style of the weekdays listed at the top of the calendar.

DayNameFormat

Sets the format of the day names . Possible values are FirstLetter , FirstTwoLetters , Full , and Short ; the default is Short .

DayStyle

Specifies the style applied to each day in the calendar.

FirstDayOfWeek

Specifies the day of the week that is displayed in the calendar's first column. Possible values are Default , Friday , Monday , Saturday , Sunday , Thursday , Tuesday , and Wednesday ; the default is Default , which uses the server's local settings.

NextMonthText

Specifies the text for the Next Month hyperlink if ShowNextPrevMonth is True .

NextPrevFormat

Specifies the format of the Next and Previous hyperlinks . Possible values are CustomText , FullMonth , and ShortMonth ; the default is CustomText .

NextPrevStyle

Specifies the style applied to the next and previous month links.

OtherMonthDayStyle

Specifies the style applied to days from other months that appear in the current month.

PrevMonthText

Specifies the text for the Previous Month hyperlink if ShowNextPrevMonth is True .

SelectedDate

Contains a DateTime value that specifies the highlighted day. The default value is TodaysDate .

SelectedDates

Contains a collection of DateTime items that represent the highlighted days on the calendar.

SelectedDayStyle

Specifies the style applied to the currently selected day.

SelectionMode

Determines whether days, weeks, or months can be selected. Possible values are Day , DayWeek , DayWeekMonth , and None ; the default is Day .

SelectMonthText

Contains HTML text displayed for selecting months when SelectionMode has the value DayWeekMonth .

SelectorStyle

Specifies the style applied to the link for selecting the week or month.

SelectWeekText

Contains HTML text displayed for selecting weeks when SelectionMode has the value DayWeek or DayWeekMonth .

ShowDayHeader

Displays the names of the days of the week if True .

ShowGridLines

Renders the calendar with lines around the days if True .

ShowNextPrevMonth

Displays Next Month and Previous Month links if True .

ShowTitle

Displays the calendar's title if True .

TitleFormat

Determines how the month name appears in the title bar. Possible values are Month and MonthYear .

TitleStyle

Specifies the style applied to the calendar's title bar.

TodayDayStyle

Specifies the style applied to the current date.

TodaysDate

Specifies a DateTime value that sets the calendar's current date.

VisibleDate

Specifies a DateTime value that sets the month to display.

WeekendDayStyle

Specifies the style applied to weekend days.

Methods

Description

OnDayRender

Raises the DayRender event.

OnSelectionChanged

Raises the SelectionChanged event.

OnVisibleMonthChanged

Raises the VisibleMonthChanged event.

Events

Description

DayRender

Raised before each day cell is rendered on the calendar.

SelectionChanged

Raised when a new day, month, or week is selected.

VisibleMonthChanged

Raised by clicking the Next Month or Previous Month link.

NOTE

See Chapter 4 for more information.


Table . CheckBox Properties, Methods, and Events

Properties

Description

AutoPostBack

Automatically posts the form containing the check box whenever it is checked or unchecked when True .

Checked

Has the value True when the check box is checked, and False otherwise .

Text

Gets or sets the text label associated with the check box.

Methods

Description

TextAlign

Determines how the text label for the check box is aligned relative to the check box. Possible values are Left and Right ; the default value is Right .

OnCheckedChanged

Raises the CheckedChanged event.

Events

Description

CheckedChanged

Raised when the check box changes from being checked to unchecked or unchecked to checked.

NOTE

See Chapter 2 for more information.


Table . CheckBoxList Properties, Methods, and Events

Properties

Description

AutoPostBack

Automatically posts the form containing the CheckBoxList whenever a new check box is selected or unselected when True .

CellPadding

Sets the number of pixels between the border and a particular check box.

CellSpacing

Sets the number of pixels between individual check boxes in the CheckBoxList .

DataMember

Identifies the particular table in a data source to bind to the control.

DataSource

Indicates the data source for the items listed in the CheckBoxList .

DataTextField

Indicates the field from the data source to use for the check box labels.

DataTextFormatString

Gets or sets a format string that determines how the DataTextField is displayed.

DataValueField

Indicates the field from the data source to use for the check box values.

Items

Represents the collection of items in the CheckBoxList .

RepeatColumns

Determines the number of columns used to display the check boxes.

RepeatDirection

Indicates the direction the check boxes should be repeated. Possible values are Horizontal and Vertical .

RepeatLayout

Determines how the check boxes are formatted. Possible values are Table and Flow ; Table is the default.

SelectedIndex

Specifies the index number of the currently checked check box.

SelectedItem

Represents the selected check button.

SelectedValue

Gets or sets the selected check box.

TextAlign

Indicates the alignment of the check box label relative to the check box. Possible values are Left and Right .

Method

Description

DataBind

Binds the CheckBoxList to its data source. Loads the items from the data source into the ListItem collection.

OnSelectedIndexChanged

Raises the SelectedIndexChanged event.

Events

Description

SelectedIndexChanged

Raised whenever a new check box is checked or unchecked in the CheckBoxList .

NOTE

See Chapter 2 for more information.


Table . CompareValidator Properties, Methods, and Events

Properties

Description

ControlToCompare

Specifies the ID of the control to use for comparing values.

ControlToValidate

Specifies the ID of the control that you want to validate.

Display

Sets how the error message contained in the Text property is displayed. Possible values are Static , Dynamic , and None ; the default value is Static .

EnableClientScript

Enables or disables client-side form validation. The default value is True .

Enabled

Enables or disables both server- and client-side validation. The default value is True .

ErrorMessage

Specifies the error message displayed in the ValidationSummary control. This error message is displayed by the control when the Text property is not set.

IsValid

Has the value True when the validation check succeeds, and False otherwise.

Operator

Gets or sets the comparison operator to use when performing comparisons. Possible values are Equal , NotEqual , GreaterThan , GreaterThanEqual , LessThan , LessThanEqual , and DataTypeCheck .

Text

Sets the error message displayed by the control.

Type

Gets or sets the data type to use when comparing values. Possible values are Currency , Date , Double , Integer , and String .

ValueToCompare

Specifies the value used when performing the comparison.

Methods

Description

Validate

Performs validation and updates the IsValid property.

Events

Description

None

 

NOTE

See Chapter 3, "Performing Form Validation with Validation Controls," for more information.


Table . CustomValidator Properties, Methods, and Events

Properties

Description

ClientValidationFunction

Specifies the name of a client-side validation function.

ControlToValidate

Specifies the ID of the control that you want to validate.

Display

Sets how the error message contained in the Text property is displayed. Possible values are Static , Dynamic , and None ; the default value is Static .

EnableClientScript

Enables or disables client-side form validation. The default value is True .

Enabled

Enables or disables both server- and client-side validation. The default value is True .

ErrorMessage

Specifies the error message displayed in the ValidationSummary control. This error message is displayed by the control when the Text property is not set.

IsValid

Has the value True when the validation check succeeds, and False otherwise.

Text

Sets the error message displayed by the control.

Methods

Description

OnServerValidate

Raises the ServerValidate event.

Validate

Performs validation and updates the IsValid property.

Events

Description

ServerValidate

Represents the subroutine for performing the server-side validation.

NOTE

See Chapter 3 for more information.


Table . DataGrid Properties, Methods, and Events

Properties

Description

AllowCustomPaging

Enables custom paging when True .

AllowPaging

Enables normal paging when True .

AllowSorting

Enables sorting when True .

AlternatingItemStyle

Specifies the style applied to alternating rows displayed in the DataGrid .

AutoGenerateColumns

Automatically generates columns from the data source when True .

BackImageUrl

Specifies the URL of an image to display as the background for the DataGrid .

CellPadding

Specifies the amount of padding in each cell in a DataGrid .

CellSpacing

Specifies the amount of spacing between cells in a DataGrid .

Columns

Represents the collection of columns in the DataGrid (does not include autogenerated columns).

CurrentPageIndex

Sets the current page when paging is enabled.

DataKeyField

Gets or sets the primary key field in the data source.

DataKeys

Returns a collection of primary keys from the data source.

DataMember

Specifies the table in the DataSet to bind to the DataGrid .

DataSource

Specifies the data source for the DataGrid .

EditItemIndex

Sets the current row selected for editing.

EditItemStyle

Specifies the style applied to the row selected for editing.

FooterStyle

Specifies the style applied to the footer of the DataGrid .

GridLines

Determines how lines are displayed between cells. Possible values are Both , Horizontal , None , and Vertical .

HeaderStyle

Specifies the style applied to the header of the DataGrid .

HorizontalAlign

Sets the horizontal alignment of the DataGrid . Possible values are Center , Justify , Left , NotSet , and Right .

Items

Represents a collection of DataGridItem objects in the DataGrid .

ItemStyle

Specifies the style applied to each item displayed in the DataGrid .

PageCount

Specifies a count of the number of pages when paging is enabled.

PagerStyle

Specifies the style applied to the paging interface. The style properties are represented by the DataGridPagerStyleObject .

PageSize

Specifies the number of rows displayed in a page when paging is enabled.

SelectedIndex

Sets the row that is currently selected in the DataGrid .

SelectedItem

Returns a DataGridItem that represents the currently selected row in the DataGrid .

SelectedItemStyle

Specifies the style applied to the selected item in the DataGrid .

ShowFooter

Displays a footer at the bottom of the DataGrid when True .

ShowHeader

Displays a header at the top of the DataGrid when True .

VirtualItemCount

Gets or sets the number of items in the DataGrid when custom paging is enabled.

Methods

Description

DataBind

Binds the DataGrid to its data source.

OnCancelCommand

Raises the CancelCommand event.

OnDeleteCommand

Raises the DeleteCommand event.

OnEditCommand

Raises the EditCommand event.

OnItemCommand

Raises the ItemCommand event.

OnItemCreated

Raises the ItemCreated event.

OnItemDataBound

Raises the ItemDataBound event.

OnPageIndexChanged

Raises the PageIndexChanged event.

OnSelectedIndexChanged

Raises the SelectedIndexChanged event.

OnSortCommand

Raises the SortCommand event.

OnUpdateCommand

Raises the UpdateCommand event.

Events

Description

CancelCommand

Raised when the Cancel button is clicked.

DeleteCommand

Raised when the Delete button is clicked.

EditCommand

Raised when the Edit button is clicked.

ItemCommand

Raised when any button is clicked.

ItemCreated

Raised when each item is created in the DataGrid .

ItemDataBound

Raised when an item is bound in the DataGrid .

PageIndexChanged

Raised when the current page is changed when paging is enabled.

SelectedIndexChanged

Raised when an item in the DataGrid is selected.

SortCommand

Raised when a column is sorted and sorting is enabled.

UpdateCommand

Raised when the Update button is clicked.

NOTE

See Chapter 11, "Using the DataList and DataGrid Controls," for more information.


Table . DataList Properties, Methods, and Events

Properties

Description

AlternatingItemStyle

Specifies the style applied to alternating rows displayed in the DataList .

AlternatingItemTemplate

Specifies the template used for alternating items in the DataList .

CellPadding

Specifies the amount of padding in each cell in a DataList .

CellSpacing

Specifies the amount of spacing between cells in a DataList .

DataKeyField

Gets or sets the primary key field in the data source.

DataKeys

Returns a collection of primary keys from the data source.

DataMember

Specifies the table in the DataSet to bind to the DataGrid .

DataSource

Specifies the data source for the DataList .

EditItemIndex

Sets the current item selected for editing.

EditItemStyle

Specifies the style applied to the item selected for editing.

EditItemTemplate

Specifies the template used for the item selected for editing.

ExtractTemplateRows

Extracts rows from Table controls displayed in templates and displays them as rows in one large Table when True .

FooterStyle

Specifies the style applied to the footer of the DataGrid .

FooterTemplate

Specifies the template used for displaying the footer of the DataList .

GridLines

Determines how lines are displayed between cells. Possible values are Both , Horizontal , None , and Vertical .

HeaderStyle

Specifies the style applied to the header of the DataList .

HeaderTemplate

Specifies the template used for displaying the header of the DataList .

HorizontalAlign

Sets the horizontal alignment of the DataList . Possible values are Center , Justify , Left , NotSet , and Right .

Items

Represents a collection of DataListItem objects in the DataList .

ItemStyle

Specifies the style applied to each item displayed in the DataList .

ItemTemplate

Specifies the template used for displaying each item in the DataList .

RepeatColumns

Specifies the number of columns to display in the DataList .

RepeatDirection

Determines the direction that items are repeated. Possible values are Horizontal and Vertical .

RepeatLayout

Determines whether items in a DataList are displayed with an HTML table. Possible values are Table and Flow .

SelectedIndex

Sets the row that is currently selected in the DataList .

SelectedItem

Returns a DataListItem that represents the currently selected item in the DataList .

SelectedItemStyle

Specifies the style applied to the selected item in the DataList .

SelectedItemTemplate

Specifies the template used for displaying selected items in the DataList .

SeparatorStyle

Specifies the style applied to the separator between each item in a DataList .

SeparatorTemplate

Specifies the template used for displaying separators between each item in a DataList .

ShowFooter

Displays a footer at the bottom of the DataList when True .

ShowHeader

Displays a header at the top of the DataList when True .

Methods

Description

DataBind

Binds the DataGrid to its data source.

OnCancelCommand

Raises the CancelCommand event.

OnDeleteCommand

Raises the DeleteCommand event.

OnEditCommand

Raises the EditCommand event.

OnItemCommand

Raises the ItemCommand event.

OnItemCreated

Raises the ItemCreated event.

OnItemDataBound

Raises the ItemDataBound event.

OnSelectedIndexChanged

Raises the SelectedIndexChanged event.

OnUpdateCommand

Raises the UpdateCommand event.

Events

Description

CancelCommand

Raised when the Cancel button is clicked.

DeleteCommand

Raised when the Delete button is clicked.

EditCommand

Raised when the Edit button is clicked.

ItemCommand

Raised when any button is clicked.

ItemCreated

Raised when each item is created in the DataList .

ItemDataBound

Raised when an item is bound in the DataList .

SelectedIndexChanged

Raised when an item in the DataList is selected.

UpdateCommand

Raised when the Update button is clicked.

NOTE

See Chapter 11 for more information.


Table . DropDownList Properties, Methods, and Events

Properties

Description

AutoPostBack

Automatically posts the form containing the drop-down list whenever a new option is selected when True .

DataMember

Identifies the particular table in a data source to bind to the control.

DataSource

Indicates the data source for the items listed in the DropDownList .

DataTextField

Indicates the field from the data source to use for the option text.

DataTextFormatString

Gets or sets a format string that determines how the DataTextField is displayed.

DataValueField

Indicates the field from the data source to use for the option values.

Items

Represents the collection of items in the DropDownList .

SelectedIndex

Specifies the index number of the selected option.

SelectedItem

Represents the selected option.

SelectedValue

Gets or sets the selected option.

Methods

Description

DataBind

Binds the DropDownList to its data source. Loads the items from the data source into the ListItem collection.

OnSelectedIndexChanged

Raises the SelectedIndexChanged event.

Events

Description

SelectedIndexChanged

This event is raised whenever a new option is selected in the DropDownList .

NOTE

See Chapter 2 for more information.


Table . HyperLink Properties, Methods, and Events

Properties

Description

ImageUrl

Specifies the URL of an image to display for the link.

NavigateUrl

Specifies the URL of the page to which the user is transferred when the link is clicked.

Target

Specifies the target window or frame for the link. Possible values are _top , _self , _parent , _search , or _blank .

Text

Specifies the text label for the link.

Methods

Description

None

 

Events

Description

None

 

NOTE

See Chapter 2 for more information.


Table . Image Properties, Methods, and Events

Properties

Description

AlternateText

Specifies text displayed by browsers that do not support images.

ImageAlign

Determines the alignment of the image. Possible values are AbsBottom , AbsMiddle , BaseLine , Bottom , Left , Middle , NotSet , Right , TextTop , and Top .

ImageUrl

Specifies the URL of an image to display.

Methods

Description

None

 

Events

Description

None

 
Table . ImageButton Properties, Methods, and Events

Properties

Description

AlternateText

Gets or sets the text displayed when a browser does not support images.

CausesValidation

Does not validate the form submitted by the button when False . The default value is True .

CommandArgument

Passes this value to the Command event when the button is clicked.

CommandName

Passes this value to the Command event when the button is clicked.

ImageAlign

Specifies one of these possible values: AbsBottom , AbsMiddle , Baseline , Bottom , Left , Middle , NotSet , Right , TextTop , or Top .

ImageURL

Specifies the URL of the image to use for the button.

Methods

Description

OnClick

Raises the Click event.

OnCommand

Raises the Command event.

Events

Description

Click

Raised when the button is clicked and the form containing the button is submitted to the server.

Command

Also raised when the button is clicked. However, the values of the CommandName and CommandArgument properties are passed to this event.

NOTE

See Chapter 2 for more information.


Table . Label Properties, Methods, and Events

Properties

Description

Text

Gets or sets the text displayed by the Label control.

Methods

Description

None

 

Events

Description

None

 

NOTE

See Chapter 2 for more information.


Table . LinkButton Properties, Methods, and Events

Properties

Description

CausesValidation

Does not validate the form submitted by the button when False . The default value is True .

CommandArgument

Passes this value to the Command event when the link is clicked.

CommandName

Passes this value to the Command event when the link is clicked.

Text

Gets or sets the text displayed as the label for the link.

Methods

Description

OnClick

Raises the Click event.

OnCommand

Raises the Command event.

Events

Description

Click

Raised when the link is clicked and the form containing the link is submitted to the server.

Command

Also raised when the link is clicked. However, the values of the CommandName and CommandArgument properties are passed to this event.

NOTE

See Chapter 2 for more information.


Table . ListBox Properties, Methods, and Events

Properties

Description

AutoPostBack

Automatically posts the form containing the list box whenever a new option is selected when True .

DataMember

Identifies the particular table in a data source to bind to the control.

DataSource

Indicates the data source for the items listed in the list box.

DataTextField

Indicates the field from the data source to use for the option text.

DataTextFormatString

Gets or sets a format string that determines how the DataTextField is displayed.

DataValueField

Indicates the field from the data source to use for the option values.

Items

Represents the collection of items in the list box.

Rows

Indicates the number of rows to display in the list box. The default value is 4 .

SelectedIndex

Specifies the index number of the selected option.

SelectedItem

Represents the selected option.

SelectionMode

Determines whether a user can select more than one list item at a time. Possible values are Multiple and Single .

SelectedValue

Gets or sets the selected list item.

Method

Description

DataBind

Binds the ListBox to its data source. Loads the items from the data source into the ListItem collection.

OnSelectedIndexChanged

Raises the SelectedIndexChanged event.

Events

Description

SelectedIndexChanged

Raised whenever a new option is selected in the list box.

NOTE

See Chapter 2 for more information.


Table . Literal Properties, Methods, and Events

Properties

Description

Text

Gets or sets the text displayed by the control.

Methods

Description

None

 

Events

Description

None

 
Table . Panel Properties, Methods, and Events

Properties

Description

BackImageURL

Gets or sets the URL of a background image to be displayed behind the contents of the panel.

HorizontalAlign

Sets the horizontal alignment of the contents of a panel. Possible values are Center , Justify , Left , NotSet , and Right .

Wrap

Wraps the contents of the panel when True . The default value is True .

Methods

Description

None

 

Events

Description

None

 

NOTE

See Chapter 4 for more information.


Table . PlaceHolder Properties, Methods, and Events

Properties

Description

None

 

Methods

Description

None

 

Events

Description

None

 

NOTE

See Chapter 4 for more information.


Table . RadioButton Properties, Methods, and Events

Properties

Description

AutoPostBack

Automatically posts the form containing the radio button whenever a new radio button is selected from the radio button group when True .

Checked

Has the value True when the radio button is checked, and False otherwise.

GroupName

Specifies the name of the group that contains the radio button.

Text

Gets or sets the text label associated with the radio button.

TextAlign

Determines how the text label for the radio button is aligned relative to the radio button. Possible values are Left and Right ; the default value is Right .

Methods

Description

OnCheckedChanged

Raises the CheckedChanged event.

Events

Description

CheckedChanged

Raised when the radio button changes from being checked to unchecked, or unchecked to checked.

NOTE

See Chapter 2 for more information.


Table . RadioButtonList Properties, Methods, and Events

Properties

Description

AutoPostBack

Automatically posts the form containing the RadioButtonList whenever a new radio button is selected when True .

CellPadding

Sets the number of pixels between the border and a particular radio button.

CellSpacing

Sets the number of pixels between individual radio buttons in the RadioButtonList .

DataMember

Identifies the particular table in a data source to bind to the control.

DataSource

Identifies the data source for the items listed in the RadioButtonList .

DataTextField

Identifies the field from the data source to use for the radio button labels.

DataTextFormatString

Gets or sets a format string that determines how the DataTextField is displayed.

DataValueField

Identifies the field from the data source to use for the radio button values.

Items

Represents the collection of items in the RadioButtonList .

RepeatColumns

Determines the number of columns used to display the radio buttons.

RepeatDirection

Indicates the direction the radio buttons should be repeated. Possible values are Horizontal and Vertical .

RepeatLayout

Determines how the radio buttons are formatted. Possible values are Table and Flow ; Table is the default.

SelectedIndex

Specifies the index number of the currently checked radio button.

SelectedItem

Represents the selected radio button.

SelectedValue

Gets or sets the selected radio button.

TextAlign

Indicates the alignment of the radio button label relative to the radio button. Possible values are Left and Right .

Methods

Description

DataBind

Binds the RadioButtonList to its data source. Loads the items from the data source into the items collection.

OnSelected IndexChanged

Raises the SelectedIndexChanged event.

Events

Description

Selected IndexChanged

Raised when a new radio button is selected in the RadioButtonList .

NOTE

See Chapter 2 for more information.


Table . RangeValidator Properties, Methods, and Events

Properties

Description

ControlToValidate

Specifies the ID of the control that you want to validate.

Display

Sets how the error message contained in the Text property is displayed. Possible values are Static , Dynamic , and None ; the default value is Static .

EnableClientScript

Enables or disables client-side form validation. The default value is True .

Enabled

Enables or disables both server- and client-side validation. The default value is True .

ErrorMessage

Specifies the error message displayed in the ValidationSummary control. This error message is displayed by the control when the Text property is not set.

IsValid

Has the value True when the validation check succeeds, and False otherwise.

MaximumValue

Specifies the maximum value in the range of permissible values.

MinimumValue

Specifies the minimum value in the range of values.

Text

Sets the error message displayed by the control.

Type

Gets or sets the data type to use when comparing values. Possible values are Currency , Date , Double , Integer , and String .

Methods

Description

Validate

Performs validation and updates the IsValid property.

Events

Description

None

 

NOTE

See Chapter 3 for more information.


Table . RegularExpressionValidator Properties, Methods, and Events

Properties

Description

ControlToValidate

Specifies the ID of the control that you want to validate.

Display

Sets how the error message contained in the Text property is displayed. Possible values are Static , Dynamic , and None ; the default value is Static .

EnableClientScript

Enables or disables client-side form validation. The default value is True .

Enabled

Enables or disables both server- and client-side validation. The default value is True .

ErrorMessage

Specifies the error message displayed in the ValidationSummary control. This error message is displayed by the control when the Text property is not set.

IsValid

Has the value True when the validation check succeeds, and False otherwise.

Text

Sets the error message displayed by the control.

ValidationExpression

Specifies the regular expression to use when performing validation.

Methods

Description

Validate

Performs validation and updates the IsValid property.

Events

Description

None

 

NOTE

See Chapter 3 for more information.


Table . Repeater Properties, Methods, and Events

Properties

Description

Alternating ItemTemplate

Specifies the template used for alternating items in the Repeater .

DataMember

Specifies the table in the DataSet to bind to the Repeater .

DataSource

Specifies the data source for the Repeater .

FooterTemplate

Specifies the template used for displaying the footer of the Repeater .

HeaderTemplate

Specifies the template used for displaying the header of the Repeater .

Items

Represents a collection of RepeaterItem objects in the Repeater .

ItemTemplate

Specifies the template used for displaying each item in the DataList .

SeparatorTemplate

Specifies the template used for displaying separators between each item in the Repeater .

Methods

Description

DataBind

Binds the DataGrid to its data source.

OnItemCommand

Raises the ItemCommand event.

OnItemCreated

Raises the ItemCreated event.

OnItemDataBound

Raises the ItemDataBound event.

Events

Description

ItemCommand

Raised when any button is clicked.

ItemCreated

Raised when each item is created in the Repeater .

ItemDataBound

Raised when an item is bound in the Repeater .

NOTE

See Chapter 10 for more information.


Table . RequiredFieldValidator Properties, Methods, and Events

Properties

Description

ControlToValidate

Specifies the ID of the control that you want to validate.

Display

Sets how the error message contained in the Text property is displayed. Possible values are Static , Dynamic , and None ; the default value is Static .

EnableClientScript

Enables or disables client-side form validation. The default value is True .

Enabled

Enables or disables both server- and client-side validation. The default value is True .

ErrorMessage

Specifies the error message displayed in the ValidationSummary control. This error message is displayed by the validation control when the Text property is not set.

InitialValue

Gets or sets the initial value of the control specified by the ControlToValidate property.

IsValid

Has the value True when the validation check succeeds, and False otherwise.

Text

Sets the error message displayed by the control.

Methods

Description

Validate

Performs validation and updates the IsValid property.

Events

Description

None

 

NOTE

See Chapter 3 for more information.


Table . Table Properties, Methods, and Events

Properties

Description

BackImageURL

Gets or sets the URL of a background image to be displayed behind the contents of the table.

CellPadding

Specifies the amount of padding in pixels contained in each cell.

CellSpacing

Specifies the amount of padding in pixels between cells.

GridLines

Determines how lines are displayed between cells. Possible values are Both , Horizontal , None , and Vertical .

HorizontalAlign

Sets the horizontal alignment of the contents of the table. Possible values are Center , Justify , Left , NotSet , and Right .

Rows

Returns the collection of rows in the Table .

Methods

Description

None

 

Events

Description

None

 
Table . TableCell Properties, Methods, and Events

Properties

Description

ColumnSpan

Specifies the number of columns that the cell occupies.

HorizontalAlign

Sets the horizontal alignment of the contents of the cell. Possible values are Center , Justify , Left , NotSet , and Right .

RowSpan

Specifies the number of rows that the cell occupies.

Text

Specifies the text that appears in the cell.

VerticalAlign

Sets the vertical alignment of the cell. Possible values are NotSet , Top , Middle , and Bottom .

Wrap

Word-wraps the contents of the cell when True .

Methods

Description

None

 

Events

Description

None

 
Table . TableRow Properties, Methods, and Events

Properties

Description

Cells

Returns the collection of TableCell objects contained in the TableRow .

HorizontalAlign

Sets the horizontal alignment of the contents of the TableRow . Possible values are Center , Justify , Left , NotSet , and Right .

VerticalAlign

Sets the vertical alignment of the cell. Possible values are NotSet , Top , Middle , and Bottom .

Methods

Description

None

 

Events

Description

None

 
Table . TableBox Properties, Methods, and Events

Properties

Description

AutoPostBack

Automatically posts the form containing the text box whenever a change is made to the contents of the text box when True .

Columns

Indicates the horizontal size of the text box in characters .

MaxLength

Specifies the maximum number of characters that you can add to the text box (does not work with multiline text boxes).

ReadOnly

Indicates whether the text box is read-only or can be modified.

Rows

Indicates the vertical size of a multiline text box in characters.

Text

Gets or sets the text displayed by the TextBox control.

TextMode

Specifies one of these possible values: MultiLine , Password , or SingleLine .

Wrap

Determines how text in a multiline text box word-wraps. If True , word-wrapping is enabled.

Methods

Description

OnTextChanged

Raises the TextChanged event.

Events

Description

TextChanged

Raised when the contents of a text box have been changed.

NOTE

See Chapter 2 for more information.


Table . ValidationSummary Properties, Methods, and Events

Properties

Description

DisplayMode

Sets the formatting for the error messages displayed by the control. Possible values are BulletList , List , and SingleParagraph .

EnableClientScript

Enables or disables client-side form validation. The default value is True .

Enabled

Enables or disables both server- and client-side validation. The default value is True .

HeaderText

Sets the text displayed at the top of the summary.

ShowMessageBox

Displays error messages in a pop-up message box when True .

ShowSummary

Enables or disables the summary of error messages.

Methods

Description

None

 

Events

Description

None

 

NOTE

See Chapter 3 for more information.


Table . Xml Properties, Methods, and Events

Properties

Description

Document

Specifies the System.Xml.XmlDocument object to display.

DocumentContent

Specifies a string representing the XML document to display.

DocumentSource

Specifies the URL of a document to display.

Transform

Specifies the System.Xml.Xsl.XslTransform object used to format the XML document.

TransformArgumentList

Specifies the XsltArgumentList used to format the XML document.

TransformSource

Specifies the URL of an XSL Transform used to format the XML document.

Methods

Description

None

 

Events

Description

None

 

NOTE

See Chapter 13, "Working with XML," for more information.


Table . Base Web Control Formatting Properties and Methods

Properties

Description

AccessKey

Indicates a keyboard shortcut for selecting a control. Use a single letter or number when holding down the Alt key.

BackColor

Indicates the color that appears behind the text of a control. This value can be specified by name (red, blue) or by RGB value (#FF0000, #0000FF).

BorderColor

Indicates the border color of the control.

BorderStyle

Sets the appearance of the border. Possible values are Dashed , Dotted , Double , Groove , Inset , None , NotSet , Outset , Ridge , and Solid .

BorderWidth

Indicates the thickness of a control's border in pixels.

CssClass

Specifies the Cascading Style Sheet class used for formatting the output of the control.

Enabled

Prevents the control from functioning when False . On Internet Explorer, the control appears ghosted .

Font-Bold

Displays text in bold.

Font-Italic

Displays text in italic.

Font-Name

Indicates the name of the typeface for formatting text.

Font-Names

Specifies a list of typeface names for formatting text. If the first typeface is not available, the second typeface is applied, and so on.

Font-Overline

Draws a line above the text.

Font-Size

Sets the size of a font in points or pixels.

Font-Strikeout

Draws a line through the text.

Font-Underline

Draws a line under the text.

ForeColor

Specifies the text color.

Height

Sets the height of the control in pixels.

Style

Returns a collection of style attributes for the outer tag of a control.

Properties

Description

TabIndex

Indicates the tab order of the controls (works only with Internet Explorer 4.0 and higher).

ToolTip

Sets the text that appears when the mouse pointer hovers over the control.

Width

Sets the width of the control in pixels or percentage.

Methods

Description

ApplyStyle

Copies any nonblank elements of a Style object to a control.

MergeStyle

Copies any nonblank elements of a Style object to a control, but does not overwrite existing elements.

Table . TableStyle Formatting Properties and Methods

Properties

Description

BackColor

Indicates the color that appears behind the text of a Table control. This value can be specified by name (red, blue) or by RGB value (#FF0000, #0000FF).

BackImageUrl

Specifies the URL of an image to display behind the Table control.

BorderColor

Indicates the border color of the control.

BorderStyle

Sets the appearance of the border. Possible values are Dashed , Dotted , Double , Groove , Inset , None , NotSet , Outset , Ridge , and Solid .

BorderWidth

Indicates the thickness of a control's border in pixels.

CellPadding

Specifies the padding within cells in the Table control in pixels.

CellSpacing

Specifies the padding between cells in the Table control in pixels.

CssClass

Specifies the Cascading Style Sheet class used for formatting the output of the control.

Font-Bold

Displays text in bold.

Font-Italic

Displays text in italic.

Font-Name

Indicates the name of the typeface for formatting text.

Font-Names

Specifies a list of typeface names for formatting text. If the first typeface is not available, the second typeface is applied, and so on.

Font-Overline

Draws a line above the text.

Font-Size

Sets the size of a font in points or pixels.

Font-Strikeout

Draws a line through the text.

Font-Underline

Draws a line under the text.

ForeColor

Specifies the text color.

GridLines

Determines how lines appear between cells. Possible values are Both , Horizontal , None , and Vertical .

Height

Sets the height of the control in pixels.

HorizontalAlign

Sets the horizontal alignment of the Table control within the page. Possible values are Center , Justify , Left , NotSet , and Right .

Width

Sets the width of the control in pixels or percentage.

Methods

Description

CopyFrom

Copies any nonblank elements of a Style object to the Table control.

MergeWith

Copies any nonblank elements of a Style object to the Table control, but does not overwrite existing elements.

Table . TableItemStyle Formatting Properties and Methods

Properties

Description

BackColor

Indicates the color that appears behind the text of a cell. This value can be specified by name (red, blue) or by RGB value (#FF0000, #0000FF).

BorderColor

Indicates the border color of the control.

BorderStyle

Sets the appearance of the border. Possible values are Dashed , Dotted , Double , Groove , Inset , None , NotSet , Outset , Ridge , and Solid .

BorderWidth

Indicates the thickness of a control's border in pixels.

CssClass

Specifies the Cascading Style Sheet class used for formatting the output of the control.

Font-Bold

Displays text in bold.

Font-Italic

Displays text in italic.

Font-Name

Indicates the name of the typeface for formatting text.

Font-Names

Specifies a list of typeface names for formatting text. If the first typeface is not available, the second typeface is applied, and so on.

Font-Overline

Draws a line above the text.

Font-Size

Sets the size of a font in points or pixels.

Font-Strikeout

Draws a line through the text.

Font-Underline

Draws a line under the text.

ForeColor

Specifies the text color.

Height

Sets the height of the control in pixels.

HorizontalAlign

Sets the horizontal alignment of the contents of the cell. Possible values are Center , Justify , Left , NotSet , and Right .

VerticalAlign

Sets the vertical alignment of the contents of the cell. Possible values are Bottom , Middle , NotSet , and Top .

Width

Sets the width of the control in pixels or percentage.

Wrap

Word-wraps the contents of the cell when True .

Methods

Description

CopyFrom

Copies any nonblank elements of a Style object to the control.

MergeWith

Copies any nonblank elements of a Style object to the control, but does not overwrite existing elements.



ASP.NET Unleashed
ASP.NET 4 Unleashed
ISBN: 0672331128
EAN: 2147483647
Year: 2003
Pages: 263

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net