标签:
1 public ActionResult xx([Bind(Exclude = "id")] xxModel xx, HttpPostedFileBase file)//排除id验证 2 3 //Bind(Include="name,age") 只允许name和age验证
ModelState.Remove("Name")//另一种排除验证方式
Bind[Exclude|Include]排除字段或只允许字段验证
标签:
原文地址:http://www.cnblogs.com/X-Jonney/p/4648656.html