Ejemplo n.º 1
0
 public ActionResult PostDifferentModel(BasicViewModel vm)
 {
     ViewBag.Action         = "PostDifferentModel";
     ViewBag.ModelType      = vm.GetType().Name;
     ViewBag.BoundModelData = JsonConvert.SerializeObject(vm, Formatting.Indented);
     ViewBag.BoundModel     = vm;
     return(View("ChangingContext"));
 }
 public ActionResult PostDifferentModel(BasicViewModel vm, bool tagHelpers)
 {
     ViewBag.Action         = "PostDifferentModel";
     ViewBag.ModelType      = vm.GetType().Name;
     ViewBag.BoundModelData = JsonSerializer.Serialize(vm, new JsonSerializerOptions {
         WriteIndented = true
     });
     ViewBag.BoundModel = vm;
     return(View(tagHelpers ? "ChangingContextTH" : "ChangingContext"));
 }
 public ActionResult PostDifferentModel(BasicViewModel vm)
 {
     ViewBag.Action = "PostDifferentModel";
     ViewBag.ModelType = vm.GetType().Name;
     ViewBag.BoundModelData = JsonConvert.SerializeObject(vm, Formatting.Indented);
     ViewBag.BoundModel = vm;
     return View("ChangingContext");
 }