diff options
author | xue <> | 2006-03-28 12:55:15 +0000 |
---|---|---|
committer | xue <> | 2006-03-28 12:55:15 +0000 |
commit | 8e06ea7fb257f47c98d34e8cc4a5b6d5b96f600a (patch) | |
tree | 9d0a59145cd66864f06d53a66540a92010d63e4a /demos/quickstart/protected | |
parent | 17864540c497e7e64b56a3ebbef9d0fbe2fc556d (diff) |
Fixed a description error in quickstart tutorial about using customized page state persister.
Diffstat (limited to 'demos/quickstart/protected')
-rw-r--r-- | demos/quickstart/protected/pages/Advanced/Performance.page | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/demos/quickstart/protected/pages/Advanced/Performance.page b/demos/quickstart/protected/pages/Advanced/Performance.page index 3b83dab3..0f65e61b 100644 --- a/demos/quickstart/protected/pages/Advanced/Performance.page +++ b/demos/quickstart/protected/pages/Advanced/Performance.page @@ -62,18 +62,19 @@ To switch application mode, configure it in application configuration: By default, PRADO stores page state in hidden fields of the HTML output. The page state could be very large in size if complex controls, such as <tt>TDataGrid</tt>, is used. To reduce the size of the network transmitted page size, two strategies can be used.
</p>
<p>
-First, you may disable viewstate by setting <tt>EnableViewState</tt> to false for the page or some controls on the page if they do not need user interactions. Viewstate is mainly used to keep track of page state when a user interacts with that page.
+First, you may disable viewstate by setting <tt>EnableViewState</tt> to false for the page or some controls on the page if they do not need user interactions. Viewstate is mainly used to keep track of page state when a user interacts with that page/control.
</p>
<p>
-Second, you may use a different page state storage. For example, page state may be stored in session, which essentially stores page state on the server side and thus saves the network transmission time. The module responsible for page state storage is <tt>System.Web.UI.TPageStatePersister</tt>, which uses hidden fields as persistent storage. To use your own storage, configure the module in application configuration as follows,
+Second, you may use a different page state storage. For example, page state may be stored in session, which essentially stores page state on the server side and thus saves the network transmission time. The <tt>StatePersisterClass</tt> property of the page determines which state persistence class to use. By default, it uses <tt>System.Web.UI.TPageStatePersister</tt> to store persistent state in hidden fields. You may modify this property to a persister class of your own, as long as the new persister class implements the <tt>IPageStatePersister</tt> interface. You may configure this property in several places, such as application configuration or page configuration using <pages> or <page> tags,
</p>
<com:TTextHighlighter Language="xml" CssClass="source">
-<service id="page" class="TPageService">
- <modules>
- <module id="state" class="MyPageStatePersister" />
- </modules>
-</service>
+<pages StatePersisterClass="MyPersister1" ... >
+ <page ID="SpecialPage" StatePersisterClass="MyPersister2" ... />
+</pages>
</com:TTextHighlighter>
+<p>
+Note, in the above the <tt>SpecialPage</tt> will use <tt>MyPersister2</tt> as its persister class, while the rest pages will use <tt>MyPersister1</tt>. Therefore, you can have different state persister strategies for different pages.
+</p>
<h2>Other Techniques</h2>
<p>
|