public ActionResult RemoteName(int?id)
 {
     for (int i = 0; i < 5; i++)
     {
         ValidationMaxRemoteModel.GetModell(i);
     }
     return(View(ValidationMaxRemoteModel.GetModell(id ?? 1)));
 }
        public ActionResult RemoteNamePost(int?id, FormCollection coll)
        {
            if (!id.HasValue)
            {
                return(RedirectToAction("Index"));
            }
            var  model  = ValidationMaxRemoteModel.GetModell(id.Value);
            bool result = this.TryUpdateModel(model);

            return(View(model));
        }
        public JsonResult RemoteNameValidator(string FullName, string Address, int id)
        {
            System.Threading.Thread.Sleep(1000);
            if (ValidationMaxRemoteModel.IsNameReserved(FullName))
            {
                //1. változat az attribútum hibaüzenete
                return(Json(false));

                //2. változat szerver oldali hibaüzenet
                return(Json("Sajnos a név már foglalt (controller message)"));
            }
            return(Json(true));

            return(Json("true"));
        }