0

I have a controller that takes the results of a form submit and if certain conditions are met it will modify the view model and return to the view. DisplayFor values are changing correctly but EditorFor values seem to be holding the original values from the pre-post form. I have verified that the View model sent to the view has the correct values.

Any ideas why these seem to be cached on the client side?

John S
  • 7,909
  • 21
  • 77
  • 145
  • Are you changing the values that are being POSTed in the controller and then return the view model or returning what is being posted? – Aram Dec 02 '15 at 21:04
  • 1
    That's the default behavior. You should be following the PRG pattern (and redirect to a GET method if you have a different view to display). For an explanation of the behavior, refer [this anwser](http://stackoverflow.com/questions/26654862/textboxfor-displaying-initial-value-not-the-value-updated-from-code/26664111#26664111) –  Dec 02 '15 at 21:04
  • Possible duplicate of [Reset the value of textarea after form submission](http://stackoverflow.com/questions/787895/reset-the-value-of-textarea-after-form-submission) –  Dec 04 '15 at 00:17

0 Answers0