Exemplo n.º 1
0
        public ActionResult HomeWithPost(HomeModel data, bool NewPage = false)
        {
            if (string.IsNullOrWhiteSpace(data.Name))
            {
                // Push back an error
                ModelState.AddModelError("Name", "Name must be specified");
                return(View(data));
            }
            else
            {
                _name = data.Name;

                if (NewPage)
                {
                    return(RedirectToAction("ShowEditorValues"));
                }
                else
                {
                    // Refresh the home page
                    return(IntelliTect.Journey.RefreshPage());
                }
            }
        }
Exemplo n.º 2
0
        public ActionResult HomeWithPost(HomeModel data, bool NewPage = false)
        {
            if (string.IsNullOrWhiteSpace(data.Name))
            {
                // Push back an error
                ModelState.AddModelError("Name", "Name must be specified");
                return View(data);
            }
            else
            {
                _name = data.Name;

                if (NewPage)
                {
                    return RedirectToAction("ShowEditorValues");
                }
                else
                {
                    // Refresh the home page
                    return IntelliTect.Journey.RefreshPage();
                }
            }
        }
Exemplo n.º 3
0
        public ActionResult HomeWithPostNewPage(HomeModel data)
        {
            if (string.IsNullOrWhiteSpace(data.Name))
            {
                // Push back an error
                ModelState.AddModelError("Name", "Name must be specified");
                return View(data);
            }
            else
            {
                _name = data.Name;

                return RedirectToAction("ShowEditorValues");
            }
        }
Exemplo n.º 4
0
 public ActionResult HomeWithPost()
 {
     var data = new HomeModel()
     {
         Name = _name
     };
     return View(data);
 }