System.Web.HttpContext.GetGlobalResourceObject Method

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

Syntax

public static object GetGlobalResourceObject (string classKey, string resourceKey)

Parameters

classKey
A string that represents the System.Web.Compilation.ResourceExpressionFields.ClassKey property of the requested resource object.
resourceKey
A string that represents the System.Web.Compilation.ResourceExpressionFields.ResourceKey property of the requested resource object.

Returns

An object that represents the requested application-level resource object; otherwise, null if a resource object is not found or if a resource object is found but it does not have the requested property.

Remarks

The HttpContext.GetGlobalResourceObject(string, string) method returns a global resource by using the culture that is specified in the System.Globalization.CultureInfo.CurrentUICulture property.

Note:

In some editing environments, such as vwprvw, the editor might throw a design-time System.Resources.MissingManifestResourceException exception if you use a period (.) in the global resource-key name. However, this does not affect your ability to edit or save the file, and you can ignore the error.

Requirements

Namespace: System.Web
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 2.0.0.0