This documentation is archived and is not being maintained.

HttpContext.GetGlobalResourceObject Method (String, String)

Note: This method is new in the .NET Framework version 2.0.

Gets an application-level resource object based on the specified ClassKey and ResourceKey properties.

Namespace: System.Web
Assembly: System.Web (in system.web.dll)

public static Object GetGlobalResourceObject (
	string classKey,
	string resourceKey
)
public static Object GetGlobalResourceObject (
	String classKey, 
	String resourceKey
)
public static function GetGlobalResourceObject (
	classKey : String, 
	resourceKey : String
) : Object

Parameters

classKey

A string that represents the ClassKey of the requested resource object.

resourceKey

A string that represents the ResourceKey of the requested resource object.

Return Value

An Object that represents the requested application-level resource object. If a matching resource object is found, but not a resourceKey, a null reference (Nothing in Visual Basic) is returned.

Exception typeCondition

MissingManifestResourceException

A resource object with the specified classKey was not found.

The GetGlobalResourceObject method returns a global resource using the culture specified in the CurrentUICulture property.

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

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0
Show: