0

With MVC, I hear that it's good practice to get back to a 'GET' action by using RedirectToAction after processing the Http postback. I understand this is so the postback is not repeated should the user refresh the page or bookmark and revisit it. I think that is sensible but after the redirect the model errors are lost so I can't display them using Html.ValidationSummary. What is the recommended practice in this scenario? Many thanks

tereško
  • 58,060
  • 25
  • 98
  • 150
Bobbler
  • 633
  • 1
  • 7
  • 21

1 Answers1

0

You shouldn't allow to redirect before errors are displayed. In fact, all logic happens before redirect - insert new data, check data, display errors, correct data, save data, redirect, insert new data.

nubm
  • 1,153
  • 2
  • 14
  • 32