摘要:
利用MVC的实体验证框架,AJAX提交,返回错误信息。扩展方法实现publicstaticclassModelStateExtensions{publicstaticstringExpendErrors(thisSystem.Web.Mvc.Controllercontroller){System.Text.StringBuildersbErrors=newSystem.Text.StringBuilder();foreach(varitemincontroller.ModelState.Values){if(item.Errors.Count>0){for(inti=item.Erro 阅读全文
posted @ 2011-11-02 11:27
andyran
阅读(1208)
评论(0)
推荐(0)