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 속성 설정