Reputation: 15430
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.
Upvotes: 0
Views: 337
Reputation: 13600
You can't, it's a feature of webforms. If you don't like this, use MVC instead.
Upvotes: 0
Reputation: 15861
try using ViewStateMode
property , as you are using .net 4
ViewStateMode="Disabled"
check for these links
Upvotes: 0