HOME HTML CSS JAVASCRIPT SQL PHP JQUERY XML ASP.NET MORE...
REFERENCES | EXAMPLES | FORUM | ABOUT

ASP.NET Rows Property


ListBox Control Reference Complete ListBox Control Reference

Definition and Usage

The Rows property is used to get or set the number of rows visible (without scrolling) in the ListBox.

Syntax

<asp:ListBox Rows="num" runat="server">
Some Content
</asp:ListBox>

Attribute Description
num Specifies the number of rows visible (without scrolling) in the ListBox.


Example

The following example sets the Rows property of a ListBox control:

<form runat="server">
<asp:ListBox id="lb1" Rows="5" runat="server">
  <asp:ListItem Value="Item1" />
  <asp:ListItem Value="Item2" />
  <asp:ListItem Value="Item3" />
  <asp:ListItem Value="Item4" />
  <asp:ListItem Value="Item5" />
</asp:ListBox>
</form>

Show example »

ListBox Control Reference Complete ListBox Control Reference

Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]
Search w3schools.com:

WEB BUILDING

Download XML Editor FREE Website BUILDER Free HTML5 Templates

SHARE THIS PAGE