http://stackoverflow.com/questions/2697299/asp-net-mvc-why-is-html-checkbox-generating-an-additional-hidden-input

http://bbs.csdn.net/topics/390707144

“因为checkbox如果不选中的话,提交表单时它是不会被提交的,这样会导致服务器端controller中Model Binder失败或出错,所以加了隐藏文本框,它的值永远是false,也就是checkbox不选中的话提交的就是这个隐藏文本框的值”

 

对此"这样会导致服务器端controller中Model Binder失败或出错",我表示怀疑>.<

相关文章:

  • 2021-10-24
  • 2022-01-26
  • 2022-12-23
  • 2022-02-28
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-20
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-12-17
  • 2022-12-23
  • 2021-09-28
相关资源
相似解决方案