I am new to MVC and have a simple Question.
This is my view:
@model EditWorkflowViewModel
@Html.TextBoxFor(m => m.Test, new { id = "txtbTest", @class = "form-control"})
<button class="btn btn-success" id="btnOk"><i class="fa fa-floppy-o"></i> Ok</button>
This is my Controller Action:
[HttpPost]
public ActionResult Edit(EditWorkflowViewModel viewModel)
{
//... Code to persist the viewModel Data...
viewModel.Test = "changed";
if (Request.IsAjaxRequest())
return PartialView("_Edit", viewModel);
return View("_Edit", viewModel);
}
Why is the TextBox not updated with the Text "changed" after the Action was executed and how can i update the view in this case?
Thanks for Help