ASP.NET Rows属性


ListBox 控件

定義と用法

プロパティは、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 控件 其他扩展