Page.Application-Eigenschaft
Ruft das HttpApplicationState-Objekt für die aktuelle Webanforderung ab.
Namespace: System.Web.UI
Assembly: System.Web (in system.web.dll)
Syntax
'Declaration
Public ReadOnly Property Application As HttpApplicationState
'Usage
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
Eigenschaftenwert
Die aktuellen Daten in der HttpApplicationState-Klasse.
Beispiel
' 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();
}
Plattformen
Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
.NET Framework unterstützt nicht alle Versionen sämtlicher Plattformen. Eine Liste der unterstützten Versionen finden Sie unter Systemanforderungen.
Versionsinformationen
.NET Framework
Unterstützt in: 2.0, 1.1, 1.0
Siehe auch
Referenz
Page-Klasse
Page-Member
System.Web.UI-Namespace
HttpApplicationState