Objects are generated in the form of:
var localRes = { BackupFailed: "Backup was not completed", Loading: "Loading" );
where the resource key becomes the property name with a string value.
The handler is driven through query string variables determines which resources are returned:
ResourceSet - Examples: "resources" (global), "admin/somepage.aspx" "default.aspx" (local) LocaleId - Examples: "de-de","de","" (empty=invariant) ResourceType - Resx,ResDb IncludeControls - if non-blank includes control values (. in name) VarName - name of hte variable generated - if omitted localRes or globalRes is created. ResourceMode - Flag required to find Resx resources on disk 0 - Local 1 - global 2 - plain resx
Resources retrieved are aggregated for the locale Id (ie. de-de returns de-de,de and invariant) whichever matches first.
public class JavaScriptResourceHandler : object, IHttpHandler
Member | Description | |
---|---|---|
Constructor | ||
GetJavaScriptGlobalResourcesUrl | Returns a URL to the JavaScriptResourceHandler.axd handler that retrieves normalized resources for a given resource set and localeId and creates a JavaScript object with the name specified. public static string GetJavaScriptGlobalResourcesUrl(string varName,
string resourceSet, string localeId, ResourceProviderTypes resourceType); public static string GetJavaScriptGlobalResourcesUrl(string varName,
string resourceSet); |
|
GetJavaScriptLocalResourcesUrl | Inserts local resources into the current page. public static string GetJavaScriptLocalResourcesUrl(string varName,
string localeId, string resourceSet, ResourceProviderTypes resourceType, bool includeControls); public static string GetJavaScriptLocalResourcesUrl(string varName,
bool includeControls); |
|
GetJavaScriptResourcesUrl | Returns a standard Resx resource based on it's . delimited resourceset name this version defaults to automatic detection of type (ResX or Db) based on configuration settings in provider section and the currently active locale on the machine. public static string GetJavaScriptResourcesUrl(string varName,
string resourceSet); public static string GetJavaScriptResourcesUrl(string varName,
string resourceSet, string localeId); public static string GetJavaScriptResourcesUrl(string varName,
string resourceSet, string localeId, ResourceProviderTypes resourceType); |
|
ProcessRequest | public sealed void ProcessRequest(HttpContext context);
|
|
RegisterJavaScriptGlobalResources | Inserts global resources into the current page. public static void RegisterJavaScriptGlobalResources(Control control,
string varName, string resourceSet, string localeId, ResourceProviderTypes resourceType); public static void RegisterJavaScriptGlobalResources(Control control,
string varName, string resourceSet); |
|
RegisterJavaScriptLocalResources | Inserts local resources into the current page. public static void RegisterJavaScriptLocalResources(Control control,
string varName, string localeId, string resourceSet, ResourceProviderTypes resourceType, bool includeControls); public static void RegisterJavaScriptLocalResources(Control control,
string varName); |
|
IsReusable |