Page.Application プロパティ
現在の Web 要求に対する HttpApplicationState オブジェクトを取得します。
名前空間: System.Web.UI
アセンブリ: System.Web (system.web.dll 内)
構文
'宣言
Public ReadOnly Property Application As HttpApplicationState
'使用
Dim instance As Page
Dim value As HttpApplicationState
value = instance.Application
public HttpApplicationState Application { get; }
public:
property HttpApplicationState^ Application {
HttpApplicationState^ get ();
}
/** @property */
public HttpApplicationState get_Application ()
public function get Application () : HttpApplicationState
適用できません。
プロパティ値
HttpApplicationState クラス内の現在のデータ。
使用例
' When this page is loaded, the source for the
' MyDataGrid control is obtained from Application state.
Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Dim Source As DataView = Application("Source")
MySpan.Controls.Add(New LiteralControl(Source.Table.TableName))
MyDataGrid.DataSource = Source
MyDataGrid.DataBind()
End Sub
// When this page is loaded, the source for the
// MyDataGrid control is obtained from Application state.
void Page_Load(object sender, EventArgs e ) {
DataView Source = (DataView)(Application["Source"]);
MySpan.Controls.Add(new LiteralControl(Source.Table.TableName));
MyDataGrid.DataSource = Source;
MyDataGrid.DataBind();
}
プラットフォーム
Windows 98,Windows Server 2000 SP4,Windows CE,Windows Millennium Edition,Windows Mobile for Pocket PC,Windows Mobile for Smartphone,Windows Server 2003,Windows XP Media Center Edition,Windows XP Professional x64 Edition,Windows XP SP2,Windows XP Starter Edition
Microsoft .NET Framework 3.0 は Windows Vista,Microsoft Windows XP SP2,および Windows Server 2003 SP1 でサポートされています。
バージョン情報
.NET Framework
サポート対象 : 3.0,2.0,1.1,1.0