ISettingsControl

Return to previous page

  • 4/7/2015
  • 830 Views

Comments

830 Views

ISettingsControl

Last updated 6 years ago

Comments

Common

(Enter the content of this article below)

Advanced

 
The ISettingsControl interface which was introduced in DotNetNuke framework version 5.00.00 defines the contract which any custom module settings control must observe to be injected into the core module settings control (Admin\Modules\ModuleSettings.ascx). ISettingsControl inherits from IModuleControl and defines only two additional members - the subroutines LoadSettings and UpdateSettings:

Namespace DotNetNuke.UI.Modules


Public Interface ISettingsControl
Inherits IModuleControl

Sub LoadSettings()
Sub UpdateSettings()

End Interface

End Namespace

In most cases, your module's custom settings control should inherit from DotNetNuke.Entities.Modules.ModuleSettingsBase which also makes available the Public ReadOnly Properties ModuleSettings, TabModuleSettings and Settings providing easy access to the hashtables holding your module's custom settings. Although your custom settings control need not be named "Settings.ascx", it must be assigned the controlKey "Settings" in the module's registration. Since the implementation of ISettingsControl in ModuleSettingsBase:

#Region "ISettingsControl Implementation"


Public Overridable Sub LoadSettings() Implements ISettingsControl.LoadSettings
End Sub

Public Overridable Sub UpdateSettings() Implements ISettingsControl.UpdateSettings
End Sub

#End Region

is already taken care of for you but does nothing, it will be your responsibility to provide overrides of both the LoadSettings and UpdateSettings methods. LoadSettings will be called by the core code (in Admin\Modules\ModuleSettings.ascx.vb should you wish to examine it) when the settings page is first loaded. UpdateSettings will be called when the "Update" button on the settings page is clicked.

DNN Digest is our monthly email newsletter. It highlights news and content from around the DNN ecosystem, such as new modules and themes, messages from leadership, blog posts and notable tweets. Keep your finger on the pulse of the ecosystem by subscribing.  


Copyright 2017 by DNN Corp Terms of Use Privacy
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out