Session.Clear() fixed my problem.
ASP.NET MVC Model Errors keep displaying
-
01-06-2022 - |
Question
I have some validation on my code where I enter my address, city, phone number etc. This function works perfectly fine and returns errors as needed. When I switch from one view to another and then back on a side bar I have, the validation errors are still there. I'd like to clear these values so that I dont see them everytime I go back to the tab. I've tried
modelstate.clear()
and that doesnt work, so any other ideas would be appreciated. Thanks!
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow