ASP.NET Core - Changing form values after a post
I'm probably missing something very obvious, but all I'm trying to do is have a simple form, allow it to POST, change one of the fields, and when it returns it should show me the changed value. Simple, right? The model looks like this: public class TestModel { public string Field1 { get; set; } public string Field2 { get; set; } } The controller actions: public IActionResult Test() { return View(new TestModel()); } [HttpPost] public IActionResult Test(TestModel model) { model.Field1 = "changed"; // this seems to be ignored return View(model); } The view: @model AspNetCoreTest1.Models.TestModel