views:

19

answers:

2

Recently we copied an ASP.NET WebForms solution. In this solution we are using some ASP:ListBoxes where the Rows property is set to more than 1.

This renders following HTML..

 <select size="8" name="ctl00$MainContainer$lbType" multiple="multiple"
    onchange="javascript:setTimeout('__doPostBack(\'ctl00$MainContainer$lbType\',\'\')', 0)" id="ctl00_MainContainer_lbType">
   <option value="--">-- - --</option>
   <option value="BR00">BR00</option>
   <option value="BR01">BR01</option> 
   <option value="...">...</option>   
</select>

Looks fine to me. But the strange thing is that in the copied solution the browser doesn't render what it should be rendering. The size property seems to be ignored. It just gets rendered as if the size was set to one.

This applies to all listboxes in the solution. I compared the masterpages and web.configs and there are no differences. This issue also applies to all browsers. I used IE8 Developer tools to compare the documentmodes and they are the same for both solutions.

I have no clue where to go from here..

A: 

could you give me a bigger code sample? the syntax on that one line seems fine. Do all options have a unique identifier? if so try putting a self created tag after it with some dummy data.

Edit: above code should work tested it out with asp.net mvc

OhBugger
A: 

After some digging we found out that someone or the Visual Studio designer edited a CSS file where the select height was set to 20px. I was assuming none of the css files were edited.

Thanks for your time.