Understanding ASP.NET View State

Costas

Administrator
Staff member
https://msdn.microsoft.com/en-us/library/ms972976.aspx

 

Global Setting
 
JavaScript:
<!--Web.config-->
	<?xml version="1.0"?>

	<configuration>
	    <system.web>
	      <compilation debug="true" targetFramework="4.5" />
	      <httpRuntime targetFramework="4.5" />
	      

	    </system.web>
	</configuration>

 

2nd solution
 

JavaScript:
//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 :
JavaScript:
<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
 
Top