HttpContext.GetLocalResourceObject HttpContext.GetLocalResourceObject HttpContext.GetLocalResourceObject HttpContext.GetLocalResourceObject Method

Definition

Gets a page-level resource.

Overloads

GetLocalResourceObject(String, String) GetLocalResourceObject(String, String) GetLocalResourceObject(String, String) GetLocalResourceObject(String, String)

Gets a page-level resource object based on the specified VirtualPath and ResourceKey properties.

GetLocalResourceObject(String, String, CultureInfo) GetLocalResourceObject(String, String, CultureInfo) GetLocalResourceObject(String, String, CultureInfo) GetLocalResourceObject(String, String, CultureInfo)

Gets a page-level resource object based on the specified VirtualPath and ResourceKey properties, and on the CultureInfo object.

GetLocalResourceObject(String, String) GetLocalResourceObject(String, String) GetLocalResourceObject(String, String) GetLocalResourceObject(String, String)

Gets a page-level resource object based on the specified VirtualPath and ResourceKey properties.

public:
 static System::Object ^ GetLocalResourceObject(System::String ^ virtualPath, System::String ^ resourceKey);
public static object GetLocalResourceObject (string virtualPath, string resourceKey);
static member GetLocalResourceObject : string * string -> obj
Public Shared Function GetLocalResourceObject (virtualPath As String, resourceKey As String) As Object

Parameters

virtualPath
String String String String

The VirtualPath property for the local resource object.

resourceKey
String String String String

A string that represents a ResourceKey property of the requested resource object

Returns

An Object that represents the requested page-level resource object; otherwise, null if a matching resource object is found but not a resourceKey parameter.

Exceptions

The specified virtualPath parameter is not in the current application's root directory.

Remarks

The GetLocalResourceObject method returns a local resource by using the culture that is specified in the CurrentUICulture property.

See also

GetLocalResourceObject(String, String, CultureInfo) GetLocalResourceObject(String, String, CultureInfo) GetLocalResourceObject(String, String, CultureInfo) GetLocalResourceObject(String, String, CultureInfo)

Gets a page-level resource object based on the specified VirtualPath and ResourceKey properties, and on the CultureInfo object.

public:
 static System::Object ^ GetLocalResourceObject(System::String ^ virtualPath, System::String ^ resourceKey, System::Globalization::CultureInfo ^ culture);
public static object GetLocalResourceObject (string virtualPath, string resourceKey, System.Globalization.CultureInfo culture);
static member GetLocalResourceObject : string * string * System.Globalization.CultureInfo -> obj
Public Shared Function GetLocalResourceObject (virtualPath As String, resourceKey As String, culture As CultureInfo) As Object

Parameters

virtualPath
String String String String

The VirtualPath property for the local resource object.

resourceKey
String String String String

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

culture
CultureInfo CultureInfo CultureInfo CultureInfo

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

Returns

An Object that represents the requested local resource object, which is localized for the specified culture; otherwise null if a matching resource object is found but not a resourceKey parameter.

Exceptions

The specified virtualPath parameter is not in the current application's root directory.

Remarks

If the resource is not localized for this culture, the lookup will follow a fallback process to locate an appropriate resource. For more information, see Packaging and Deploying Resources.

See also

Applies to