asp.net.ph

HttpContext.GetLocalResourceObject Method

System.Web Namespace   HttpContext Class


.NET Framework version 2.0

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

[ VB ]
Public Shared Function GetLocalResourceObject ( _
   virtualPath As String, _
   resourceKey As String _
) As Object

[ C# ]
public static Object GetLocalResourceObject (
   string virtualPath,
   string resourceKey
)

[ C++ ]
public:
static Object^ GetLocalResourceObject (
   String^ virtualPath, 
   String^ resourceKey
)

[ JScript ]
public static Object GetLocalResourceObject (
   String virtualPath, 
   String resourceKey
)

Parameters

virtualPath
A string that represents the VirtualPath 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 page-level resource object. If a matching resource object is found, but not a resourceKey, a null reference ( Nothing in Visual Basic ) is returned.

Exceptions


Exception Type Condition
MissingManifestResourceException Occurs when a resource object with the specified virtualPath was not found.
ArgumentException The specified virtualPath was not rooted.
InvalidOperationException The resource class for the page was not found.

Example

The following example illustrates using one of the overload versions of the GetLocalResourceObject method.

 Show me 

See Also

GetLocalResourceObject Method Overload List   HttpContext 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