ListBox::Rows Property
Gets or sets the number of rows displayed in the ListBox control.
Assembly: System.Web (in System.Web.dll)
| Exception | Condition |
|---|---|
| ArgumentOutOfRangeException | The specified number of rows is less than one or greater than 2000. |
Use the Rows property to specify the number of rows to display in the ListBox control.
Caution: |
|---|
The number of rows must be between one and 2000. Values outside of this range will raise an exception. |
The value of the Rows property is stored in view state.
| Topic | Location |
|---|---|
| How to: Add ListBox Web Server Controls to a Web Forms Page | Building ASP .NET Web Applications |
| How to: Add ListBox Web Server Controls to a Web Forms Page | Building ASP .NET Web Applications |
Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Caution: