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.