ASP.NET MVC Html.RadioButton Exception

后端 未结 5 1512
梦毁少年i
梦毁少年i 2021-02-19 01:23

I haver a simple radio button list on my page that I render with the following in my view:


<%=         


        
5条回答
  •  自闭症患者
    2021-02-19 01:40

    Try adding the following line of code after the ModelState.AddModelError():

    ModelState.SetModelValue("gender", ValueProvider["gender"]);
    

提交回复
热议问题