System.Web.UI.WebControls Namespace ListBox Class
Sets or retrieves the number of rows displayed in a ListBox control.
Inline |
<asp:listbox rows = intRows ... > |
Script |
ListBox.Rows [ = intRows ] |
intRows |
Integer specifying the display height, in rows, of the list box. |
The property is read/write with a default value of 4.
Use the Rows property to specify or determine the number of rows to display in a ListBox control.
This property specifies the number of visible rows. Users may select from more items than specified, and browsers typically provide some means to scroll through the contents of the control when the contents extend beyond the visible area.
The following shows how to declaratively set the Rows property of a ListBox control at design time.
<asp:listbox id = "AvailableFonts" class = "lists"
selectionmode = "multiple" rows=8 runat = "server">
<asp:listitem>Roman</asp:listitem>
<asp:listitem>Arial Black</asp:listitem>
<asp:listitem>Garamond</asp:listitem>
<asp:listitem>Somona</asp:listitem>
<asp:listitem>Symbol</asp:listitem>
</asp:listbox>
Show me
ListBox Members