asp.net.ph

Application.StaticObjects Property

System.Web Namespace   HttpApplicationState Class


Gets all objects declared via an <object> tag where the scope is set to "Application".

[ VB ]
Public ReadOnly Property StaticObjects As _
   HttpStaticObjectsCollection

[ C# ]
public HttpStaticObjectsCollection StaticObjects {get;}

[ C++ ]
public: __property HttpStaticObjectsCollection* get_StaticObjects ( );

[ JScript ]
public function get StaticObjects ( ) : HttpStaticObjectsCollection;

Property Value

A collection of objects on the page.

Remarks

Application objects are defined in the global.asax file as follows:

<object runat="server" scope="Application"> ... </object>

Example

The following example gets all application objects into an HttpStaticObjectsCollection variable and executes a routine only if the variable is not empty ( Count is greater than 0 ).

HttpStaticObjectsCollection myAppObjects = Application.StaticObjects;

if ( myAppObjects.Count > 0 ) {
   // ... do whatever here
}
  C# VB JScript

See Also

HttpApplicationState Members Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph