As a powerful web site framework, DNN provides a number of useful classes to facilitate development modules, following several classes that are closely related to module development:
Portalmodulebase
Description: Module base class. All modules are inherited from this class. This class defines the methods and properties that are used by the DNN module.
Namespaces: DotNetNuke.Entities.Modules
File Location: Components\modules\portalmodulebase.vb
Common methods:
Editurl: Gets the URL that accesses the corresponding control based on the Controlkey defined by the module. The control that we want to invoke to define in the module definition can be implemented by this method.
Overloaded list
Public Function Editurl () as String; The Controlkey=edit control is invoked by default and does not pass parameters, and is generally used for new.
The public Function Editurl (ByVal Controlkey As String) as String; A control that invokes the specified controlkey.
Public Function Editurl (ByVal keyname As String, ByVal KeyValue as String) as string; controls that call Controlkey=edit can pass a value named KeyName is the keyvalue parameter. When editing an article, we can invoke the control that edits the article through the Editurl ("ArticleID", ArticleID) method
Public Function Editurl (ByVal keyname As String, ByVal keyvalue As String, ByVal Controlkey as String) as String; call specified CONTR Olkey the control and passes a parameter named KeyName value of KeyValue. For example, when viewing an article, we define a controlkey=show control and then invoke the article to view the control by means of Editurl ("ArticleID", ArticleID, "show").
Public Function Editurl (ByVal keyname As String, ByVal keyvalue As String, ByVal Controlkey as String, ByVal ParamArray Ad Ditionalparameters () As String) as string; we need to use this method when there are multiple parameters that need to be passed in to the control. For example: When we look at the control, we need to pass in a parameter, then we can pass Editurl ("ArticleID", ArticleID, "show", "A=avalue"), and if more arguments are passed, you can define a string array by first , and then save the arguments that need to be passed into this array.
Such as:
Dim params (2) as String
params (0) = "A=avalue"
params (1) = "B=bvalue"
strURL = Editurl ("ArticleID", ArticleID, "show", params)
Property:
Actions a module has a collection of operations that can be implemented by implementing the Iactionable interface to define module operations, such as adding a "new article" operation. These actions will be displayed to the following location in the module: