listbox forcing size of 4

T

tshad

How do I get a listbox to only have one line on the screen?

It will always have a size of the 4. It seems asp.net is putting a default
size of 4, no matter what size I set it to.

If I do the following (where I set the size to 8):

<asp:ListBox ID="ByCity" size="8" style="width:160px; border-style:inset"
class="input" SelectionMode="Multiple"
OnSelectedIndexChanged="GetZipCodes_Click" AutoPostBack="true"
runat="server" />

I get the following on the screen.

<select name="ByCity" size="4" multiple="multiple"
onchange="__doPostBack('ByCity','')" language="javascript" id="ByCity"
size="8" class="input" style="width:160px; border-style:inset">

It shows my "size=8" and also another (size=4).

How do I handle this?

Thanks,

Tom
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,577
Members
45,054
Latest member
LucyCarper

Latest Threads

Top