Select Property Pages Dialog Box
Use this dialog box to edit the properties of select elements on HTML pages, and to insert option elements and values into them. An HTML select element is processed by the client Web browser.
To open the Select Property Pages dialog box
In Visual Web Developer, open an HTML page for editing in Design view.
From the HTML group of the Toolbox, drag a Select element onto the page.
The default markup for the element is added, ready to be configured.
Select the element (which looks like drop-down menu or list box), and then on the View menu, click Property Pages.
The Select Property Pages dialog box opens.
Note
Some of these menus might not be available when the Visual Studio development environment is set to General Development settings.
Certain properties of a select element can also be edited in the Properties Window. A select element is displayed as a drop-down list if its Size property is not set or is set to one (1); it is displayed as a list box if its Size property is set to two (2) or greater.
Note
For more information, see HTML Tab, Toolbox. When designing an ASP.NET Web page, you can also drag onto the page the DropDownList or ListBox controls from the Toolbox. These Web server controls will also be rendered as select elements. Their option lists are commonly furnished via data binding.
The following properties can be set in the Select Property Pages dialog box.
UI Elements
Name
Determines how to reference this select element in scripts that manipulate its properties and retrieve option values.Size
Determines how this select element will be displayed. A value of zero (0) or one (1) specifies a drop-down list. A value of two (2) or greater specifies a list box, and sets the number of options to display at one time.Allow multiple selections
Specifies a list box in which the user can select more than one value. Note that you must write handlers to retrieve and use these values.
Options for Select Element
Text
Specifies the literal string displayed for an option within this drop-down list or list box. If Options have already been added, you can edit the text of each one.Value
Specifies the value returned when an option is selected. If options have already been added, you can edit the value returned by each one.Insert
Adds a new option to the list with the values specified in the Text and Value fields.Note
You also can add an option to a select element dynamically by using the Add method of the select.items collection.
List
Displays the options that are included in this drop-down list or list box. To modify an option, select it in the List field and edit the entries in the Text and Value fields.Up
Moves the selected options up in the drop-down list or list box.Down
Moves the selected options down in the drop-down list or list box.Delete
Removes an option from the drop-down list or list box.
See Also
Inserting a Form into a Project
How to: Add Web Server Controls to a Web Forms Page Using the Web Forms Designer
NIB: How to: Create Scripts and Edit Event Handlers
Client Script in ASP.NET Web Pages
Document Outline Window