https://msdn.microsoft.com/en-us/library/ms972976.aspx
Global Setting
<!--Web.config--> <?xml version="1.0"?> <configuration> <system.web> <compilation debug="true" targetFramework="4.5" /> <httpRuntime targetFramework="4.5" /> <pages enableViewState="false" /> </system.web> </configuration>
2nd solution
//on a page, turn EnableViewState false <%@ Page Language="C#" EnableViewState="false" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="WebApplication3.WebForm1" %>
warning the hidden field is always visible even turned OFF!! aka :
<div class="aspNetHidden"> <input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="heQ5ECpMil93RDNl0WRquLdPfp8pLKaSeDlFfSqq/YDHE0zuDUfpSF0jZnrt+VHecGlOXVoHCpwDpf22i5OQFa0qNgC2aVLp2laM0DJgSoU=" /> </div>
Beginner’s Guide To View State (secure view state)- http://www.codeproject.com/Articles/31344/Beginner-s-Guide-To-View-State