Welcome Guest Log in
EnglishRussian
   The topic address is: http://viewstatepage.softain.com/Help/ViewStatePage.aspx   Send to a friend
SoftAIN controls library
ViewStatePage class
See also  Members
Collapse all  
 
This class allows you to save the ViewState and ControlState values in different data storages, namely: in a hidden field sent to a client, in the value collection of the current session, in a file on the hard disk, and in a database.

Namespace: SoftAIN
Assembly: ViewStatePage.dll

CollapseSyntax:

C#
public class ViewStatePage: System.Web.UI.Page

CollapseRemarks

If you have studied the Quck start page, you already know that the only operation you need to do in the programme code is make all your pages get inherited from the SoftAIN.ViewStatePage class. The class operation for any specific project is entirely customized in the web.config file, in a self section. Below are the examples of how the configuration file is adjusted to save page states in a file or in database.

CollapseExample

This shows how to customize the configuration file of an application to save page states in files of the ViewStates folder:

XML 
<configSections>
    <sectionGroup name="SoftAIN">
        <section name="ViewStatePage" type="SoftAIN.ViewStatePageOptions, ViewStatePage"/>
    </sectionGroup>
</configSections>
<SoftAIN>
    <ViewStatePage Mode="File" CacheSize="1" AutoClear="true" AutoClearPeriod="10" FilesDirectory="ViewStates"/>
</SoftAIN>

The following example shows how to sustomate the configuration file to save page states in a database:

XML
<configSections>
    <sectionGroup name="SoftAIN">
        <section name="ViewStatePage" type="SoftAIN.ViewStatePageOptions, ViewStatePage"/>
    </sectionGroup>
</configSections>
<SoftAIN>
    <ViewStatePage Mode="Database" CacheSize="1" AutoClear="true" AutoClearPeriod="10" 
        SessionTableName="ViewStateSession" ValueTableName="ViewStateValue" ConnectionStringName="SoftAINConnectionString"/>
</SoftAIN>
<connectionStrings>
    <add name="SoftAINConnectionString" connectionString="Data Source=DEV_11;Initial Catalog=SoftAIN;Integrated Security=True" 
        providerName="System.Data.SqlClient"/>
</connectionStrings>

CollapseInheritance Hierarchy

CollapseVersion Information

.NET Framework

Supported in: 2.0

CollapseSee also

Copyright © 2005-2007 SoftAIN