خصائص ASP.NET
التعريف والاستخدام
يستخدم خصائص Rows للحصول على أو تعيين عدد الصفوف المرئية في ListBox (بدون تمرير).
النحو
<asp:ListBox Rows="num" runat="server"> محتوى معين </asp:ListBox>
خصائص | وصف |
---|---|
num | تحديد عدد الصفوف المرئية في ListBox (بدون تمرير). |
مثال
في المثال التالي، يتم ضبط خصائص Rows لمكون التحكم 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>
مثال
- ضبط خصائص Rows لمكون التحكم ListBox