• Share
    • Twitter
    • LinkedIn
    • Facebook
    • Email
  • Feedback
  • Improve this Doc

Class ClientResourceManager

Provides the ability to request that client resources (JavaScript and CSS) be loaded on the client browser.

Inheritance
System.Object
ClientResourceManager
Namespace: DotNetNuke.Web.Client.ClientResourceManagement
Assembly: DotNetNuke.Web.Client.dll
Syntax
public class ClientResourceManager : object

Methods

| Improve this Doc View Source

AddConfiguration()

Adds the necessary configuration to website root web.config to use the Client Dependency component.

Declaration
public static void AddConfiguration()
| Improve this Doc View Source

ClearCache()

Clear the default composite files so that it can be generated next time.

Declaration
public static void ClearCache()
| Improve this Doc View Source

ClearFileExistsCache(String)

Clears the cache used for file existence.

Declaration
public static void ClearFileExistsCache(string path)
Parameters
Type Name Description
System.String path

The path for the file.

| Improve this Doc View Source

EnableAsyncPostBackHandler()

Enables the async postback handler.

Declaration
public static void EnableAsyncPostBackHandler()
| Improve this Doc View Source

IsInstalled()

Checks if ClientDependency is installed.

Declaration
public static bool IsInstalled()
Returns
Type Description
System.Boolean

A value indicating whether the ClientDependency provider is installed.

| Improve this Doc View Source

RegisterAdminStylesheet(Page, String)

Registers a stylesheet that has an admin level priority.

Declaration
public static void RegisterAdminStylesheet(Page page, string filePath)
Parameters
Type Name Description
Page page

The page on which to register the style.

System.String filePath

The path to the CSS stylesheet.

| Improve this Doc View Source

RegisterDefaultStylesheet(Page, String)

Registers the default.css stylesheet.

Declaration
public static void RegisterDefaultStylesheet(Page page, string filePath)
Parameters
Type Name Description
Page page

The page on which to register the style.

System.String filePath

The path to the CSS stylesheet.

| Improve this Doc View Source

RegisterFeatureStylesheet(Page, String)

Registers a stylesheet for a specific feature.

Declaration
public static void RegisterFeatureStylesheet(Page page, string filePath)
Parameters
Type Name Description
Page page

The page on which to register the style.

System.String filePath

The path to the CSS stylesheet.

| Improve this Doc View Source

RegisterIEStylesheet(Page, String)

Registers a stylesheet specific for Internet Explorer.

Declaration
public static void RegisterIEStylesheet(Page page, string filePath)
Parameters
Type Name Description
Page page

The page on which to register the style.

System.String filePath

The path to the CSS stylesheet.

| Improve this Doc View Source

RegisterScript(Page, String, FileOrder.Js, IDictionary<String, String>)

Requests that a JavaScript file be registered on the client browser.

Declaration
public static void RegisterScript(Page page, string filePath, FileOrder.Js priority, IDictionary<string, string> htmlAttributes)
Parameters
Type Name Description
Page page

The current page. Used to get a reference to the client resource loader.

System.String filePath

The relative file path to the JavaScript resource.

FileOrder.Js priority

The relative priority in which the file should be loaded.

IDictionary<System.String, System.String> htmlAttributes

A dictionary of HTML attributes to use for the script tag. The key being the attribute name and the value its value.

| Improve this Doc View Source

RegisterScript(Page, String, FileOrder.Js, String, IDictionary<String, String>)

Requests that a JavaScript file be registered on the client browser.

Declaration
public static void RegisterScript(Page page, string filePath, FileOrder.Js priority, string provider, IDictionary<string, string> htmlAttributes)
Parameters
Type Name Description
Page page

The current page. Used to get a reference to the client resource loader.

System.String filePath

The relative file path to the JavaScript resource.

FileOrder.Js priority

The relative priority in which the file should be loaded.

System.String provider

The name of the provider responsible for rendering the script output.

IDictionary<System.String, System.String> htmlAttributes

A dictionary of HTML attributes to use for the script tag. The key being the attribute name and the value its value.

| Improve this Doc View Source

RegisterScript(Page, String, FileOrder.Js, String)

Requests that a JavaScript file be registered on the client browser.

Declaration
public static void RegisterScript(Page page, string filePath, FileOrder.Js priority, string provider)
Parameters
Type Name Description
Page page

The current page. Used to get a reference to the client resource loader.

System.String filePath

The relative file path to the JavaScript resource.

FileOrder.Js priority

The relative priority in which the file should be loaded.

System.String provider

The name of the provider responsible for rendering the script output.

| Improve this Doc View Source

RegisterScript(Page, String, FileOrder.Js)

Requests that a JavaScript file be registered on the client browser.

Declaration
public static void RegisterScript(Page page, string filePath, FileOrder.Js priority)
Parameters
Type Name Description
Page page

The current page. Used to get a reference to the client resource loader.

System.String filePath

The relative file path to the JavaScript resource.

FileOrder.Js priority

The relative priority in which the file should be loaded.

| Improve this Doc View Source

RegisterScript(Page, String, IDictionary<String, String>)

Requests that a JavaScript file be registered on the client browser.

Declaration
public static void RegisterScript(Page page, string filePath, IDictionary<string, string> htmlAttributes)
Parameters
Type Name Description
Page page

The current page. Used to get a reference to the client resource loader.

System.String filePath

The relative file path to the JavaScript resource.

IDictionary<System.String, System.String> htmlAttributes

A dictionary of HTML attributes to use for the script tag. The key being the attribute name and the value its value.

| Improve this Doc View Source

RegisterScript(Page, String, Int32, IDictionary<String, String>)

Requests that a JavaScript file be registered on the client browser.

Declaration
public static void RegisterScript(Page page, string filePath, int priority, IDictionary<string, string> htmlAttributes)
Parameters
Type Name Description
Page page

The current page. Used to get a reference to the client resource loader.

System.String filePath

The relative file path to the JavaScript resource.

System.Int32 priority

The relative priority in which the file should be loaded.

IDictionary<System.String, System.String> htmlAttributes

A dictionary of HTML attributes to use for the script tag. The key being the attribute name and the value its value.

| Improve this Doc View Source

RegisterScript(Page, String, Int32, String, IDictionary<String, String>)

Requests that a JavaScript file be registered on the client browser.

Declaration
public static void RegisterScript(Page page, string filePath, int priority, string provider, IDictionary<string, string> htmlAttributes)
Parameters
Type Name Description
Page page

The current page. Used to get a reference to the client resource loader.

System.String filePath

The relative file path to the JavaScript resource.

System.Int32 priority

The relative priority in which the file should be loaded.

System.String provider

The name of the provider responsible for rendering the script output.

IDictionary<System.String, System.String> htmlAttributes

A dictionary of HTML attributes to use for the script tag. The key being the attribute name and the value its value.

| Improve this Doc View Source

RegisterScript(Page, String, Int32, String, String, String, IDictionary<String, String>)

Requests that a JavaScript file be registered on the client browser.

Declaration
public static void RegisterScript(Page page, string filePath, int priority, string provider, string name, string version, IDictionary<string, string> htmlAttributes)
Parameters
Type Name Description
Page page

The current page. Used to get a reference to the client resource loader.

System.String filePath

The relative file path to the JavaScript resource.

System.Int32 priority

The relative priority in which the file should be loaded.

System.String provider

The name of the provider responsible for rendering the script output.

System.String name

Name of framework like Bootstrap, Angular, etc.

System.String version

Version number of framework.

IDictionary<System.String, System.String> htmlAttributes

A dictionary of HTML attributes to use for the script tag. The key being the attribute name and the value its value.

| Improve this Doc View Source

RegisterScript(Page, String, Int32, String, String, String)

Requests that a JavaScript file be registered on the client browser.

Declaration
public static void RegisterScript(Page page, string filePath, int priority, string provider, string name, string version)
Parameters
Type Name Description
Page page

The current page. Used to get a reference to the client resource loader.

System.String filePath

The relative file path to the JavaScript resource.

System.Int32 priority

The relative priority in which the file should be loaded.

System.String provider

The name of the provider responsible for rendering the script output.

System.String name

Name of framework like Bootstrap, Angular, etc.

System.String version

Version number of framework.

| Improve this Doc View Source

RegisterScript(Page, String, Int32, String)

Requests that a JavaScript file be registered on the client browser.

Declaration
public static void RegisterScript(Page page, string filePath, int priority, string provider)
Parameters
Type Name Description
Page page

The current page. Used to get a reference to the client resource loader.

System.String filePath

The relative file path to the JavaScript resource.

System.Int32 priority

The relative priority in which the file should be loaded.

System.String provider

The name of the provider responsible for rendering the script output.

| Improve this Doc View Source

RegisterScript(Page, String, Int32)

Requests that a JavaScript file be registered on the client browser.

Declaration
public static void RegisterScript(Page page, string filePath, int priority)
Parameters
Type Name Description
Page page

The current page. Used to get a reference to the client resource loader.

System.String filePath

The relative file path to the JavaScript resource.

System.Int32 priority

The relative priority in which the file should be loaded.

| Improve this Doc View Source

RegisterScript(Page, String)

Requests that a JavaScript file be registered on the client browser.

Declaration
public static void RegisterScript(Page page, string filePath)
Parameters
Type Name Description
Page page

The current page. Used to get a reference to the client resource loader.

System.String filePath

The relative file path to the JavaScript resource.

| Improve this Doc View Source

RegisterStyleSheet(Page, String, FileOrder.Css, IDictionary<String, String>)

Requests that a CSS file be registered on the client browser. Defaults to rendering in the page header.

Declaration
public static void RegisterStyleSheet(Page page, string filePath, FileOrder.Css priority, IDictionary<string, string> htmlAttributes)
Parameters
Type Name Description
Page page

The current page. Used to get a reference to the client resource loader.

System.String filePath

The relative file path to the CSS resource.

FileOrder.Css priority

The relative priority in which the file should be loaded.

IDictionary<System.String, System.String> htmlAttributes

A dictionary of HTML attributes to use for the link tag. The key being the attribute name and the value its value.

| Improve this Doc View Source

RegisterStyleSheet(Page, String, FileOrder.Css)

Requests that a CSS file be registered on the client browser. Defaults to rendering in the page header.

Declaration
public static void RegisterStyleSheet(Page page, string filePath, FileOrder.Css priority)
Parameters
Type Name Description
Page page

The current page. Used to get a reference to the client resource loader.

System.String filePath

The relative file path to the CSS resource.

FileOrder.Css priority

The relative priority in which the file should be loaded.

| Improve this Doc View Source

RegisterStyleSheet(Page, String, IDictionary<String, String>)

Requests that a CSS file be registered on the client browser.

Declaration
public static void RegisterStyleSheet(Page page, string filePath, IDictionary<string, string> htmlAttributes)
Parameters
Type Name Description
Page page

The current page. Used to get a reference to the client resource loader.

System.String filePath

The relative file path to the CSS resource.

IDictionary<System.String, System.String> htmlAttributes

A dictionary of HTML attributes to use for the link tag. The key being the attribute name and the value its value.

| Improve this Doc View Source

RegisterStyleSheet(Page, String, Int32, IDictionary<String, String>)

Requests that a CSS file be registered on the client browser. Defaults to rendering in the page header.

Declaration
public static void RegisterStyleSheet(Page page, string filePath, int priority, IDictionary<string, string> htmlAttributes)
Parameters
Type Name Description
Page page

The current page. Used to get a reference to the client resource loader.

System.String filePath

The relative file path to the CSS resource.

System.Int32 priority

The relative priority in which the file should be loaded.

IDictionary<System.String, System.String> htmlAttributes

A dictionary of HTML attributes to use for the link tag. The key being the attribute name and the value its value.

| Improve this Doc View Source

RegisterStyleSheet(Page, String, Int32, String, IDictionary<String, String>)

Requests that a CSS file be registered on the client browser. Allows for overriding the default provider.

Declaration
public static void RegisterStyleSheet(Page page, string filePath, int priority, string provider, IDictionary<string, string> htmlAttributes)
Parameters
Type Name Description
Page page

The current page. Used to get a reference to the client resource loader.

System.String filePath

The relative file path to the CSS resource.

System.Int32 priority

The relative priority in which the file should be loaded.

System.String provider

The provider name to be used to render the css file on the page.

IDictionary<System.String, System.String> htmlAttributes

A dictionary of HTML attributes to use for the link tag. The key being the attribute name and the value its value.

| Improve this Doc View Source

RegisterStyleSheet(Page, String, Int32, String, String, String, IDictionary<String, String>)

Requests that a CSS file be registered on the client browser. Allows for overriding the default provider.

Declaration
public static void RegisterStyleSheet(Page page, string filePath, int priority, string provider, string name, string version, IDictionary<string, string> htmlAttributes)
Parameters
Type Name Description
Page page

The current page. Used to get a reference to the client resource loader.

System.String filePath

The relative file path to the CSS resource.

System.Int32 priority

The relative priority in which the file should be loaded.

System.String provider

The provider name to be used to render the css file on the page.

System.String name

Name of framework like Bootstrap, Angular, etc.

System.String version

Version number of framework.

IDictionary<System.String, System.String> htmlAttributes

A dictionary of HTML attributes to use for the link tag. The key being the attribute name and the value its value.

| Improve this Doc View Source

RegisterStyleSheet(Page, String, Int32, String, String, String)

Requests that a CSS file be registered on the client browser. Allows for overriding the default provider.

Declaration
public static void RegisterStyleSheet(Page page, string filePath, int priority, string provider, string name, string version)
Parameters
Type Name Description
Page page

The current page. Used to get a reference to the client resource loader.

System.String filePath

The relative file path to the CSS resource.

System.Int32 priority

The relative priority in which the file should be loaded.

System.String provider

The provider name to be used to render the css file on the page.

System.String name

Name of framework like Bootstrap, Angular, etc.

System.String version

Version number of framework.

| Improve this Doc View Source

RegisterStyleSheet(Page, String, Int32, String)

Requests that a CSS file be registered on the client browser. Allows for overriding the default provider.

Declaration
public static void RegisterStyleSheet(Page page, string filePath, int priority, string provider)
Parameters
Type Name Description
Page page

The current page. Used to get a reference to the client resource loader.

System.String filePath

The relative file path to the CSS resource.

System.Int32 priority

The relative priority in which the file should be loaded.

System.String provider

The provider name to be used to render the css file on the page.

| Improve this Doc View Source

RegisterStyleSheet(Page, String, Int32)

Requests that a CSS file be registered on the client browser. Defaults to rendering in the page header.

Declaration
public static void RegisterStyleSheet(Page page, string filePath, int priority)
Parameters
Type Name Description
Page page

The current page. Used to get a reference to the client resource loader.

System.String filePath

The relative file path to the CSS resource.

System.Int32 priority

The relative priority in which the file should be loaded.

| Improve this Doc View Source

RegisterStyleSheet(Page, String)

Requests that a CSS file be registered on the client browser.

Declaration
public static void RegisterStyleSheet(Page page, string filePath)
Parameters
Type Name Description
Page page

The current page. Used to get a reference to the client resource loader.

System.String filePath

The relative file path to the CSS resource.

| Improve this Doc View Source

UpdateVersion()

This is a utility method that can be called to update the version of the composite files.

Declaration
public static void UpdateVersion()

Extension Methods

JsonExtensionsWeb.ToJson(Object)
  • View Source
Back to top by the community, for the community... #DNNCMS