Click here to Skip to main content
13,457,828 members
Click here to Skip to main content
Articles » Web Development » ASP.NET » General » Downloads


27 bookmarked
Posted 27 Jun 2007

ViewState Serializer, Compressor & Encrypter

, 26 Sep 2009
It's a very complete and robust processor of ViewState, it allows: to select the way of serialization, compression and encryption optionally.
<%@ Page Language="vb" AutoEventWireup="false" Codebehind="formTest.aspx.vb" Inherits="ViewStateSerializerDemo.formTest1"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
		<meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR">
		<meta content="Visual Basic .NET 7.1" name="CODE_LANGUAGE">
		<meta content="JavaScript" name="vs_defaultClientScript">
		<meta content="" name="vs_targetSchema">
	<body MS_POSITIONING="GridLayout">
		<script language="javascript">
		function addCommas(nStr)
			nStr += '';
			x = nStr.split('.');
			x1 = x[0];
			x2 = x.length > 1 ? ',' + x[1] : '';
			var rgx = /(\d+)(\d{3})/;
			while (rgx.test(x1)) {
				x1 = x1.replace(rgx, '$1' + '.' + '$2');
			return x1 + x2;
		<form id="Form1" method="post" runat="server">
			<asp:button id="Button1" style="Z-INDEX: 101; LEFT: 80px; POSITION: absolute; TOP: 400px" runat="server"
				Text="Do Postback"></asp:button><asp:checkbox id="chkGrid" style="Z-INDEX: 104; LEFT: 80px; POSITION: absolute; TOP: 312px" runat="server"
				Text="Show DataGrid" AutoPostBack="True"></asp:checkbox><asp:checkbox id="chkTable" style="Z-INDEX: 105; LEFT: 80px; POSITION: absolute; TOP: 352px" runat="server"
				Text="Insert DataTable" AutoPostBack="True"></asp:checkbox><asp:checkbox id="chkCrypt" style="Z-INDEX: 106; LEFT: 80px; POSITION: absolute; TOP: 464px" runat="server"
				Text="Enable Encription" AutoPostBack="True"></asp:checkbox><asp:checkbox id="chkOps" style="Z-INDEX: 107; LEFT: 80px; POSITION: absolute; TOP: 504px" runat="server"
				Text="Optimize for Data" AutoPostBack="True"></asp:checkbox><asp:datagrid id="DataGrid1" style="Z-INDEX: 108; LEFT: 304px; POSITION: absolute; TOP: 64px"
				runat="server" BorderColor="Blue"></asp:datagrid>
			<TABLE id="Table1" style="Z-INDEX: 109; LEFT: 56px; POSITION: absolute; TOP: 80px; HEIGHT: 75px"
				cellSpacing="0" cellPadding="1" border="1">
					<TD>This ViewState size:</TD>
						<asp:label id="lblOriginal" runat="server">Original</asp:label></TD>
						<asp:label id="lblViewSize" runat="server">Size</asp:label></TD>
					<TD>Load ViewState Time:</TD>
					<TD><asp:label id="lblLoadTime" runat="server">Time</asp:label></TD>
					<TD>Save ViewState Time:</TD>
					<TD><asp:label id="lblSaveTime" runat="server">Time</asp:label></TD>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Architect Sermicro
Spain Spain
My life in programming has been long, begins from the 6 years of age with Basic, I have knowledge of C++, Javascript, ASP .NET, Cisco CCNA, among others.

One of my pastimes in the programming, is cryptology and systems security

One of my recognized works is P2PFire, other smaller projects like utilities for Chats

You may also be interested in...

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.180323.1 | Last Updated 26 Sep 2009
Article Copyright 2007 by ModMa
Everything else Copyright © CodeProject, 1999-2018
Layout: fixed | fluid