HttpSessionState.Contents プロパティ

定義

現在のセッション状態オブジェクトへの参照を取得します。

public:
 property System::Web::SessionState::HttpSessionState ^ Contents { System::Web::SessionState::HttpSessionState ^ get(); };
public System.Web.SessionState.HttpSessionState Contents { get; }
member this.Contents : System.Web.SessionState.HttpSessionState
Public ReadOnly Property Contents As HttpSessionState

プロパティ値

現在の HttpSessionState です。

次のコード例では、 プロパティの項目の名前と値を Contents 一覧表示します。

foreach (string s in Session.Contents)
  Response.Write(s + " = " + Session[s].ToString() + "<br />");
For Each s As String In Session.Contents
  Response.Write(String.Format("{0} = {1}<br />", s, Session(s)))
Next

注釈

プロパティは Contents 、以前のバージョンの ASP との互換性のために提供されています。

適用対象

こちらもご覧ください