Html.DropDownListFor() in Mozilla Firefox
Posted
by Andrey
on Stack Overflow
See other posts from Stack Overflow
or by Andrey
Published on 2010-05-26T08:53:49Z
Indexed on
2010/05/26
9:01 UTC
Read the original article
Hit count: 326
asp.net-mvc-2
I'm rendering a drop down list using Html.DropDownListFor() extension. The markup I get is as follows:
select id="NationalityId" name="NationalityId"
option value="" /option
option selected="selected" value="1">Estonian /option>
option value="2">Russian /option>
option value="3">Ukranian /option>
option value="4">Belorussian /option>
option value="5">Swedish /option>
option value="6">Dutch /option>
/select>
As you can see, option with value==1 is selected. But in Firefox 3.6.3 it doesn't display as selected, empty string (first option - value == "") is displayed instead. IE7 and Chrome render the page right - the option is selected.
Does anybody know what is going on? How do I get this around?
© Stack Overflow or respective owner