DropDownList does not show enough lines

In ASP.NET, a ListBox has a Rows attribute that I can specify how many rows will be shown. A DropDownList , however, is not. Is there a way to set the maximum number of lines a DropDownList should display? Code? Markup? CSS?

+4
source share
2 answers

If you need this level of control, you need to reimplement the dropdowns in javascript. A kind of sucks.

+1
source

The drop-down list is displayed in the browser as html select ... html select does not support the requirements you specify ...

You will need to write a custom control to set a limit on the maximum number of lines.

you need to write a custom control for this or use add-ons on the client side ...

The following post also answers your question.

0
source

All Articles