asp.net.ph

HtmlSelect.Multiple Property

System.Web.UI.HtmlControls Namespace   HtmlSelect Class


Sets or retrieves a value indicating whether multiple selection is enabled in the HtmlSelect control.

Syntax


Inline <select multiple ... >
Script HtmlSelect.Multiple = [ true | false ]

Property Value

This property accepts or returns only a boolean value: true if multiple selection is enabled on the HtmlSelect control; otherwise false. The default is false.

Remarks

Use the Multiple property to specify whether multiple items can be concurrently selected in the HtmlSelect control.

By default, HtmlSelect displays as a drop-down list box. If you enable multiple selections, or specify a size that is greater than one and less than the number of items in the control, the control renders as a scrollable list box.

To determine multiple selected items, you need to iterate through the Items collection and test the ListItem.Selected property of each option item.

Example

The following example demonstrates how to programmatically enable multiple selection in the HtmlSelect control, and how the selected items can be determined.

 Show me 

See Also

HtmlSelect Members Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph