ASP.NET Rows 属性

定义和用法

Rows 属性用于获取或设置 ListBox 中的可见行数(无滚动)。

语法

<asp:ListBox Rows="num" runat="server">
some content
</asp:ListBox>
属性 描述
num 规定 ListBox 中的可见行数(无滚动)。

实例

下面的例子设置了 ListBox 控件的 Rows 属性:

<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>

实例

设置 ListBox 控件的 Rows 属性
系统帮助 | 给我留言 | 收藏本站
Copyright © 2005-2008 www.cnn84.com All Rights Reserved Ver:2.0
CNN84网是公益性便民网站,是为了给大家的日常生活查询及提供最快捷的出行指南