ASP.NET RowsPropiedad
Control ListBox
Definición y uso
La propiedad se utiliza para obtener o establecer el número de filas visibles (sin desplazamiento) en el control ListBox.
Sintaxis
<asp:ListBox Rows="num" runat="server">
Some Content
</asp:ListBox>
Some Content
</asp:ListBox>
| Propiedad | Descripción |
|---|---|
| num | Especifica el número de filas visibles (sin desplazamiento) en el control ListBox. |
Ejemplo
El siguiente ejemplo establece la propiedad Rows del control ListBox:
<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>
Demostración del ejemplo »
Control ListBox Otras extensiones