Exemplo n.º 1
0
        public ActionResult Contacts(Models.ContactsVModel model)
        {
            if (ModelState.IsValid && model.Name != "ruslan")
            {
                return(RedirectToAction("Index"));
            }

            model.ErrorMsg  = true;
            model.ErrorText = "Invalid values";

            return(View(model));
        }
Exemplo n.º 2
0
        public ActionResult Contacts()
        {
            Models.ContactsVModel model = new Models.ContactsVModel();

            return(View(model));
        }