HttpSessionState.StaticObjects Özellik

Tanım

ASP.NET uygulama dosyası Global.asax içindeki etiketler tarafından <object Runat="Server" Scope="Session"/> bildirilen nesne koleksiyonunu alır.

public:
 property System::Web::HttpStaticObjectsCollection ^ StaticObjects { System::Web::HttpStaticObjectsCollection ^ get(); };
public System.Web.HttpStaticObjectsCollection StaticObjects { get; }
member this.StaticObjects : System.Web.HttpStaticObjectsCollection
Public ReadOnly Property StaticObjects As HttpStaticObjectsCollection

Özellik Değeri

HttpStaticObjectsCollection

HttpStaticObjectsCollection Global.asax dosyasında bildirilen bir içeren nesneler.

Örnekler

Aşağıdaki kod örneği, koleksiyondaki id StaticObjects nesnelerin ve nesne türünü listeler.

foreach (System.Collections.DictionaryEntry de in Session.StaticObjects)
  Response.Write(de.Key + " is of type " + de.Value.GetType().ToString() + "<br />");
For Each de As System.Collections.DictionaryEntry In Session.StaticObjects
  Response.Write(String.Format("{0} is of type {1}<br />", de.Key, de.Value.GetType()))
Next

Açıklamalar

Sayfadaki bir nesne serileştirmeyi desteklemiyorsa ve Mode işlem dışıysa (SQLServer veya StateServer), nesne oluşturulmaz ve bu koleksiyona eklenmez.

özelliği, ASP'nin StaticObjects önceki sürümleriyle uyumluluk için sağlanır.

Şunlara uygulanır

Ayrıca bkz.