摘要:
使用方法:1。Model中增加Remote Attribute,并指定相应的验证Action路径 public class UsingRemote { [Required] [Remote("IsNumberEven", "GuestBook", ErrorMessage = "数字必须是偶数!")] public int EvenNumber { get; set; } }IsnumberEven为Action,GuestBook为Controller2。Controller中创建相应验证方法: [HttpGet] ... 阅读全文