ASP.NET 教程教程
ASP.NET ListBox Rows 属性
ASP.NET ListBox Rows 属性
ASP.NET Rows 属性

定义和用法
属性用于获取或设置 ListBox 中的可见行数(无滚动)。
语法
<asp:ListBox Rows="num" runat="server">
Some Content
</asp:ListBox>
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>
<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>
演示实例 »

| ASP.NET ListBox Rows 属性 |
|---|
ASP.NET 教程
ASP.NET 是微软公司提出的一个使用 HTML、CSS、JavaScript 和服务器脚本创建网页和网站的开发框架。ASP.NET 支持三种不同的开发模式:单页面模式、MVC 模式、事件驱动模式。
加载中,请稍侯......