ViewState is sent to the server in a hidden input-field form with the name "__VIEWSTATE". Therefore, you can access the serialized ViewState using the following command:
Request.Form["__VIEWSTATE"]
But if you look at the source code of one of your pages (in your browser), you will see that ViewState is just a long encoded string:
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE"
value="/2RkRMb2dvLnBuZ2Ag0PD..." />
I am not sure if writing this line will help you find any errors.
source
share