Mixing Microsoft MVC ajax and validation helpers with native jquery ajax

落花浮王杯 提交于 2019-12-04 13:45:58

Normally in this type of scenario I like the approach suggested in Fluent Validation. Now, first thing It will generate validation for you on client that can be check with JQuery and also you can create / generate force validation on server end. Means you define rule in class as shown in example and then check for validation using that class. So, it will check on server end. I normally use ajax just not to write html, most of the time I ll forget closing bracket and few things so helpers are good but I am not in support of Ajax.Beginform. Simple Beginform is good.

I normally go with the thumb rule, that view must have simple and clear HTML or Helpers, I tried to have less nested div and other stuff.

Please let me know if any further details needed over this topic. There few good articles you can found about this over web. If you want I can share.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!