I have a simple strongly typed view, but I cant seem to update a textbox on my form after a post.
Here is my model:
public class Repair
{
public
If you find ModelState.Clear() to be too destructive, you can target only the item you are changing, while preserving the rest with ModelState.Remove()
[AcceptVerbs(HttpVerbs.Post)]
public ActionResult Index(Repair r)
{
r.Number = "New Value";
ModelState.Remove("Number");
return View(r);
}
Also, it appears that it doesn't matter with either Remove() or Clear() whether you call that method before you update your model or after