Share via


sessionPageState 項目 (ASP.NET 設定結構描述)

設定 ASP.NET 應用程式的網頁檢視狀態設定。

<sessionPageState historySize="number" />

屬性和項目

下列章節會說明屬性、子項目和父項目。

屬性

屬性

描述

historySize

選擇性 Int32 屬性。

設定要儲存於頁面記錄的項目數。

子項目

無。

父項目

項目

描述

configuration

Common Language Runtime 和 .NET Framework 應用程式所使用之每個組態檔中的根項目。

system.web

指定 ASP.NET 組態區段的根項目。

備註

預設組態

下列預設 sessionPageState 項目沒有在電腦組態檔或根目錄 Web.config 檔中明確設定,但它卻是 .NET Framework 2.0 版中應用程式所傳回的預設組態。

<sessionPageState historySize="9" />

範例

下列範例設定 ASP.NET 應用程式的工作階段 (Session) 頁面狀態。

<sessionPageState historySize="5" />

項目資訊

組態區段處理常式

System.Web.Configuration.SessionPageStateSection

組態成員

不適用

可設定的位置

Machine.config

根層次的 Web.config

應用程式層級的 Web.config

虛擬或實體目錄層級 Web.config

需求

IIS 6.0 版

.NET Framework 2.0 版

Visual Studio 2005

請參閱

工作

How to: Configure Specific Folders Using Location Settings

How to: Lock ASP.NET Configuration Settings

參考

system.web 項目 (ASP.NET 設定結構描述)

configuration 項目 (一般設定結構描述)

PagesSection.EnableSessionState

System.Configuration

System.Web.Configuration

概念

ASP.NET Configuration File Hierarchy

Securing Configuration

Configuration Inheritance

其他資源

一般組態設定 (ASP.NET)

ASP.NET 組態設定

Configuring ASP.NET Applications

ASP.NET Configuration Files

ASP.NET Configuration API