DNN Module Development Series (4)--Classes related to module development

Source: Internet
Author: User

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:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.