摘要: 使用方法:1。Model中增加Remote Attribute,并指定相应的验证Action路径 public class UsingRemote { [Required] [Remote("IsNumberEven", "GuestBook", ErrorMessage = "数字必须是偶数!")] public int EvenNumber { get; set; } }IsnumberEven为Action,GuestBook为Controller2。Controller中创建相应验证方法: [HttpGet] ... 阅读全文
posted @ 2013-05-09 11:17 赶路人之刚出发 阅读(518) 评论(0) 推荐(0) 编辑