W3Schools.com

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
WEB HOSTING
Best Web Hosting
PHP MySQL Hosting
Best Hosting Coupons
UK Reseller Hosting
Cloud Hosting
Top Web Hosting
$3.98 Unlimited Hosting
Premium Website Design
WEB BUILDING
XML Editor - Free Trial!
FREE Website BUILDER
Best Website Templates Top CSS Templates
CREATE HTML Websites
EASY WEBSITE BUILDER
W3SCHOOLS EXAMS
Get Certified in:
HTML, CSS, JavaScript, XML, PHP, and ASP
W3SCHOOLS BOOKS
New Books:
HTML, CSS
JavaScript, and Ajax
STATISTICS
Browser Statistics
Browser OS
Browser Display
SHARE THIS PAGE