beautypg.com

Insert an asp.net radiobuttonlist control – Adobe Dreamweaver CS3 User Manual

Page 697

background image

DREAMWEAVER CS3

User Guide

690

Auto Postback

Indicates whether a postback to the server automatically occurs when the user changes the list

selection. Select the option to allow postbacks.

For more information on ASP.NET CheckBoxList properties, see the documentation on the Microsoft website at

http://msdn.microsoft.com/library/en-us/cpgenref/html/cpconcheckboxlistwebservercontrol.asp

.

Insert an ASP.NET RadioButtonList control

1

Select Insert > ASP.NET Objects > asp:RadioButtonList.

2

In the asp:RadioButtonList dialog box, set the options as follows:

ID

Specifies the name for the form control. The ID is required.

Tool Tip

Specifies the text displayed when the mouse pointer hovers over the form control in a browser.

DataSet

Specifies the data source you want to use to populate the items of the list control. If you don’t specify a

DataSet, you can specify one later or set the list items statically by clicking the List Items button in the Property
inspector.

Get Labels From

specifies the field in the selected DataSet to provide the labels of the list items.

Get Values From

specifies the field in the selected DataSet to provide the values of the list items.

Select Value Equal To

specifies a value the server uses to determine which list item is selected when the RadioBut-

tonList is displayed in a browser. The server compares each item’s value to the specified value. If the values match,
the matching item is selected.

Access Key

creates a keyboard shortcut that allows users to quickly navigate to the form control in a browser. For

example, if you enter K, the user can navigate to the control by typing Alt+K. The access key can only consist of a
single character.

Auto Postback

indicates whether a postback to the server automatically occurs when the user changes the list

selection. Select the option to allow postbacks.

For more information on ASP.NET RadioButtonList properties, see the documentation on the Microsoft website at

http://msdn.microsoft.com/library/en-us/cpgenref/html/cpconradiobuttonlistwebservercontrol.asp

.

Preselect an item in an ASP.NET RadioButtonList control

You can let the server decide whether to select a radio button in a RadioButtonList control when the ASP.NET page
is loaded in a browser.

Note: Before you begin, you must insert at least one ASP.NET RadioButtonList control in your page. You must also
define a DataSet or other source of dynamic content for the radio buttons. Ideally, the source of content should contain
Boolean data, such as Yes/No or true/false.

1

In Design view, select the RadioButtonList control.

2

In the Property inspector, click List Items.

3

Select the From Database option, and set any of the following options:

See also

“Dynamically preselect an HTML radio button” on page 610

“Defining sources of dynamic content” on page 547

September 4, 2007