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
Syntax:
Remarks
Example
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> |
Inheritance Hierarchy
Version Information
.NET Framework
Supported in: 2.0
See also