asp.net mvc radio button state

后端 未结 7 1880
轮回少年
轮回少年 2021-02-07 19:06

I\'m trying out asp.net mvc for a new project, and I ran across something odd. When I use the MVC UI helpers for textboxes, the values get persisted between calls. But, when I

相关标签:
7条回答
  • 2021-02-07 19:38

    Well logically it would not persist, there is no session state. Think of it as an entirely new page. In order to get your radio buttons to populate you need to persist back something like ViewData["ProviderType"] = 3 to have the radiobutton repopulate with its data.

    0 讨论(0)
提交回复
热议问题