Remote Attribue Validation not firing in Asp.Net MVC
问题 Here is my model code public class BlobAppModel { [Required(ErrorMessage="Please enter the name of the image")] [Remote("IsNameAvailable","Home",ErrorMessage="Name Already Exists")] public string Name { set; get; } } And in my controller I have public JsonResult IsNameAvailable(string Name) { bool xx= BlobManager.IsNameAvailable(Name); if (!xx) { return Json("The name already exists", JsonRequestBehavior.AllowGet); } return Json(true, JsonRequestBehavior.AllowGet); } And in my data I have