I know SessionState is Cleared when the session dies - usually after 20min of inactivity. My question is when does ViewState session dies ? Or does it never dies ? Is there any way to clear it ?
Viewstate lasts for as long as it's on the page - it's outputted with the HTML; check the source to your rendered page and you will see a load of text in a hidden field.
Something like:
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUJNTIyODQ4NzI.....
Once the page is gone, it's gone.
You can clear it by calling
ViewState.Clear()
Old ViewState, like old soldiers, never dies, it just fades away...
It's stored in hidden fields in the HTML page, and stays alive in the browser's cache.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With