Class DnnHelper
Namespace: DotNetNuke.Web.Mvc.Helpers
Assembly: DotNetNuke.Web.Mvc.dll
Syntax
public class DnnHelper : object
Constructors
| Improve this Doc View SourceDnnHelper(HtmlHelper)
Initializes a new instance of the DnnHelper class.
Declaration
protected DnnHelper(HtmlHelper htmlHelper)
Parameters
| Type | Name | Description |
|---|---|---|
| HtmlHelper | htmlHelper | The HtmlHelper instance to wrap. |
DnnHelper(ViewContext, IViewDataContainer, RouteCollection)
Initializes a new instance of the DnnHelper class.
Declaration
public DnnHelper(ViewContext viewContext, IViewDataContainer viewDataContainer, RouteCollection routeCollection)
Parameters
| Type | Name | Description |
|---|---|---|
| ViewContext | viewContext | The view context. |
| IViewDataContainer | viewDataContainer | The ViewData container. |
| RouteCollection | routeCollection | The route collection. |
DnnHelper(ViewContext, IViewDataContainer)
Initializes a new instance of the DnnHelper class.
Declaration
public DnnHelper(ViewContext viewContext, IViewDataContainer viewDataContainer)
Parameters
| Type | Name | Description |
|---|---|---|
| ViewContext | viewContext | The view context. |
| IViewDataContainer | viewDataContainer | The ViewData container. |
Properties
| Improve this Doc View SourceActiveModule
Declaration
public ModuleInfo ActiveModule { get; }
Property Value
| Type | Description |
|---|---|
| ModuleInfo |
ActivePage
Declaration
public TabInfo ActivePage { get; }
Property Value
| Type | Description |
|---|---|
| TabInfo |
DnnPage
Declaration
public Page DnnPage { get; set; }
Property Value
| Type | Description |
|---|---|
| Page |
LocalResourceFile
Declaration
public string LocalResourceFile { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
ModuleContext
Declaration
public ModuleInstanceContext ModuleContext { get; set; }
Property Value
| Type | Description |
|---|---|
| ModuleInstanceContext |
PortalSettings
Declaration
public PortalSettings PortalSettings { get; }
Property Value
| Type | Description |
|---|---|
| PortalSettings |
RouteCollection
Declaration
public RouteCollection RouteCollection { get; }
Property Value
| Type | Description |
|---|---|
| RouteCollection |
User
Declaration
public UserInfo User { get; }
Property Value
| Type | Description |
|---|---|
| UserInfo |
ViewBag
Declaration
public dynamic ViewBag { get; }
Property Value
| Type | Description |
|---|---|
| System.Object |
ViewContext
Declaration
public ViewContext ViewContext { get; }
Property Value
| Type | Description |
|---|---|
| ViewContext |
ViewData
Declaration
public ViewDataDictionary ViewData { get; }
Property Value
| Type | Description |
|---|---|
| ViewDataDictionary |
ViewDataContainer
Declaration
public IViewDataContainer ViewDataContainer { get; }
Property Value
| Type | Description |
|---|---|
| IViewDataContainer |
Methods
| Improve this Doc View SourceDnnCssInclude(String, FileOrder.Css)
Requests that a CSS file be registered on the client browser. Defaults to rendering in the page header.
Declaration
public void DnnCssInclude(string filePath, FileOrder.Css priority)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | filePath | The relative file path to the CSS resource. |
| FileOrder.Css | priority | The relative priority in which the file should be loaded. |
DnnCssInclude(String, Int32, String, String, String)
Requests that a CSS file be registered on the client browser. Allows for overriding the default provider.
Declaration
public void DnnCssInclude(string filePath, int priority, string provider, string name, string version)
Parameters
| Type | Name | Description |
|---|---|---|
| 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 nr of framework. |
DnnCssInclude(String, Int32, String)
Requests that a CSS file be registered on the client browser. Allows for overriding the default provider.
Declaration
public void DnnCssInclude(string filePath, int priority, string provider)
Parameters
| Type | Name | Description |
|---|---|---|
| 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. |
DnnCssInclude(String, Int32)
Requests that a CSS file be registered on the client browser. Defaults to rendering in the page header.
Declaration
public void DnnCssInclude(string filePath, int priority)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | filePath | The relative file path to the CSS resource. |
| System.Int32 | priority | The relative priority in which the file should be loaded. |
DnnCssInclude(String)
Requests that a CSS file be registered on the client browser.
Declaration
public void DnnCssInclude(string filePath)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | filePath | The relative file path to the CSS resource. |
DnnJsInclude(String, FileOrder.Js)
Requests that a JavaScript file be registered on the client browser.
Declaration
public void DnnJsInclude(string filePath, FileOrder.Js priority)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | filePath | The relative file path to the JavaScript resource. |
| FileOrder.Js | priority | The relative priority in which the file should be loaded. |
DnnJsInclude(String, Int32, String, String, String)
Requests that a JavaScript file be registered on the client browser.
Declaration
public void DnnJsInclude(string filePath, int priority, string provider, string name, string version)
Parameters
| Type | Name | Description |
|---|---|---|
| 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 nr of framework. |
DnnJsInclude(String, Int32, String)
Requests that a JavaScript file be registered on the client browser.
Declaration
public void DnnJsInclude(string filePath, int priority, string provider)
Parameters
| Type | Name | Description |
|---|---|---|
| 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. |
DnnJsInclude(String, Int32)
Requests that a JavaScript file be registered on the client browser.
Declaration
public void DnnJsInclude(string filePath, int priority)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | filePath | The relative file path to the JavaScript resource. |
| System.Int32 | priority | The relative priority in which the file should be loaded. |
DnnJsInclude(String)
Requests that a JavaScript file be registered on the client browser.
Declaration
public void DnnJsInclude(string filePath)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | filePath | The relative file path to the JavaScript resource. |
JavaScriptLibraryInclude(String, Version, SpecificVersion)
Requests that a script from a JavaScript Library be registered on the client browser.
Declaration
public void JavaScriptLibraryInclude(string name, Version version, SpecificVersion specificVersion)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The name of the JavaScript Library. |
| Version | version | The library's version. |
| SpecificVersion | specificVersion | How much of the |
JavaScriptLibraryInclude(String, Version)
Requests that a script from a JavaScript Library be registered on the client browser.
Declaration
public void JavaScriptLibraryInclude(string name, Version version)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The name of the JavaScript Library. |
| Version | version | The library's version. |
JavaScriptLibraryInclude(String)
Requests that a script from a JavaScript Library be registered on the client browser.
Declaration
public void JavaScriptLibraryInclude(string name)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The name of the JavaScript Library. |
LocalizeString(String)
Declaration
public string LocalizeString(string key)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | key |
Returns
| Type | Description |
|---|---|
| System.String |