ASP.NET MVC 3 - DropDownListFor Fails when URL Parameter Also Exists with Same Name as View Model Parameter
问题 I am not sure if this is a bug with the DropDownListFor extension or what, but we had the following: http://mydomain.com/path/page?myparam=myvalue In my View Model I have the following: public string MyParam { get; set; } public List<SelectListItem> ParamOptions { get; set; } When I do the following in my View it fails to select the correct value: @Html.DropDownListFor(x => x.MyParam, Model.ParamOptions, "Select Value") However, when I change the parameter 'MyParam' in my view model to