سؤال

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!

هل كانت مفيدة؟

المحلول

Session.Clear() fixed my problem.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top