HttpApplicationState.StaticObjects-Eigenschaft
Ruft alle durch ein <object>-Tag deklarierten Objekte ab, wobei der Gültigkeitsbereich innerhalb der ASP.NET-Anwendung auf "Application" festgelegt wird.
Namespace: System.Web
Assembly: System.Web (in system.web.dll)
Syntax
'Declaration
Public ReadOnly Property StaticObjects As HttpStaticObjectsCollection
'Usage
Dim instance As HttpApplicationState
Dim value As HttpStaticObjectsCollection
value = instance.StaticObjects
public HttpStaticObjectsCollection StaticObjects { get; }
public:
property HttpStaticObjectsCollection^ StaticObjects {
HttpStaticObjectsCollection^ get ();
}
/** @property */
public HttpStaticObjectsCollection get_StaticObjects ()
public function get StaticObjects () : HttpStaticObjectsCollection
Eigenschaftenwert
Eine Auflistung von Objekten auf der Seite.
Hinweise
Anwendungsobjekte werden in der Datei Global.asax innerhalb der <object runat="server" scope="Application"> </object>
-Tags definiert.
Beispiel
Im folgenden Beispiel werden alle Anwendungsobjekte in eine HttpStaticObjectsCollection-Variable abgerufen, und es wird eine Routine ausgeführt, wenn die Anzahl der Objekte größer als 0 (null) ist.
Dim PageObjects As HttpStaticObjectsCollection
PageObjects = Application.StaticObjects
If PageObjects.Count > 0 Then
'...
End If
HttpStaticObjectsCollection PageObjects;
PageObjects = Application.StaticObjects;
if (PageObjects.Count > 0)
{
//...
}
HttpStaticObjectsCollection pageObjects;
pageObjects = get_Application().get_StaticObjects();
if (pageObjects.get_Count() > 0) {
//...
}
var pageObjects : HttpStaticObjectsCollection
pageObjects = Application.StaticObjects
if(pageObjects.Count > 0){
//...
}
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
HttpApplicationState-Klasse
HttpApplicationState-Member
System.Web-Namespace