asp.net.ph

HtmlSelect.Size Property

System.Web.UI.HtmlControls Namespace   HtmlSelect Class


Sets or retrieves the height of the HtmlSelect control.

Syntax


Inline <select size = intRows ... >
Script HtmlSelect.Size [ = intRows ]

Property Value


intRows Integer specifying the height, in rows, of the HtmlSelect control.

The property is read/write with no default value.

Remarks

Use the Size property to specify the height in rows of the HtmlSelect control. This sets the number of options visible in the select box at a time.

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.

Example

The below code shows how to declaratively set the Size property of an HtmlSelect control at design time.

<select id="mySelect" size=3 runat="server">
   <option>Earth</option>
   ...
   <option>Venus</option>
</select>

The following shows how to programmatically set the Size property at run time, depending on user input.

 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