views:

14

answers:

1

I have a dropdownlist that is simply a list of strings (salutations). When I submit the form, the field is an empty string no matter what value is selected. In firefox, it works exactly as expected...but not in IE. <tr> <td>Salutation : </td><td><%= Html.DropDownList("Salutation", new SelectList(Salutations.SalutationList, Model.Salutation), "")%></td> </tr>

Any help is appreciated.

A: 

Fixed by doing this instead.

<tr>
    <td>Salutation : </td><td><%= Html.DropDownList("Salutation", new SelectList(Salutations.SalutationList.Select(x => new { value = x, text = x }), "value", "text", Model.Salutation), "")%></td>
</tr>
Aruna M