I have the following code:
public ViewResult test(testModel model)
{
if (ModelState.IsValid)
{
SaveData(model);
}
testModel.Name = "testing returned view data";
return View("TestManage", model);
}
The TestManage view has
@model testModel
and has the textbox
@Html.EditorFor(model => model.Name)
Why isn’t the view reflecting the new testModel.Name data? Am I missing something or is this part of a bigger problem?
clear the model state by using
ModelState.Clear()