Exemplo n.º 1
0
        public IActionResult Submit(WithStaticViewModel model)
        {
            this.Model = model;
            // "Fighting the framework" by bypassing 1 pass model binding...
            model.ContentString = Request.Form["ContentString"];

            model.Content.Add(model.ContentTextBox);
            model.ContentTextBox = String.Empty; // never updated without RedirectToAction
            return(View("Index", model));
        }
Exemplo n.º 2
0
 public IActionResult Index(WithStaticViewModel model)
 {
     this.Model = model;
     return(View(model));
 }