0
votes

In the page directive of my page I have set EnableViewState="false". But I am still seeing some viewstate on my page source with this field

<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/...................................

How can I remove the view state completely. I am using .NET 4.

3

3 Answers

1
votes

What you're seeing is Control State. It cannot be turned off.

0
votes

try using ViewStateMode property , as you are using .net 4

ViewStateMode="Disabled"

check for these links

  1. Viewstate controling asp.net 4.0
0
votes

You can't, it's a feature of webforms. If you don't like this, use MVC instead.