IEnumerable to SelectList, no value is selected

后端 未结 4 1000
囚心锁ツ
囚心锁ツ 2020-12-31 06:05

I have something like the following in an ASP.NET MVC application:

IEnumerable list = GetTheValues();
var selectList = new SelectList(list, \"S         


        
4条回答
  •  無奈伤痛
    2020-12-31 06:25

    Take a look at this: ASP.NET MVC SelectList selectedValue Gotcha

    This is as good explanation of what is going on as any.

提交回复
热议问题