public ActionResult Hvalid2(ValidationDemoModel inputmodel)
        {
            if (ModelState.IsValid && inputmodel.Id > 0)
            {
                var model = ValidationDemoModel.GetModell(inputmodel.Id);
                model.Address  = inputmodel.Address;
                model.FullName = inputmodel.FullName;
                return(View("Hvalid", model));
            }

            return(View("Hvalid", inputmodel));
        }
        public ActionResult Hvalid(int?id, FormCollection coll)
        {
            if (!id.HasValue)
            {
                return(RedirectToAction("Hvalid"));
            }
            bool elotte = ModelState.IsValid;

            var model = ValidationDemoModel.GetModell(id.Value);

            if (this.TryUpdateModel(model))
            {
                return(View("Hvalid", model));
            }
            bool utana = ModelState.IsValid;

            return(View(model));
        }
        public ActionResult Hvalid3(int?id, string FullName, string Address)
        {
            if (!id.HasValue)
            {
                return(RedirectToAction("Hvalid"));
            }
            var  model  = ValidationDemoModel.GetModell(id.Value);
            bool elotte = ModelState.IsValid;

            //model.Email = null; //Hogy a modell szintű customValidation attributum működjön.
            if (TryUpdateModel(model))
            {
                model.Address  = Address;
                model.FullName = FullName;
                return(View("Hvalid", model));
            }
            bool utana = ModelState.IsValid;

            return(View("Hvalid", model));
        }
 public ActionResult Hvalid3(int?id)
 {
     return(View("Hvalid", ValidationDemoModel.GetModell(id ?? 1)));
 }