Mojoportal module development overview

Source: Internet
Author: User

Original article: http://www.mojoportal.com/overviewofcontentfeaturedevelopment.aspx

 

Developing a module embedded in the mojoportal system is very simple. The module can be very simple and only contain one module control (contactform. the ascx module is a simple example). It can also be very complicated and requires several other aspx pages to provide support, such as the Forum module.

 

A module must contain at least one (usually one) module control inherited from mojoportal. Web. sitemodulecontrol. The module control is also embedded in the mojoportal Content Management System, which allows you to add module instances to the page.

 

Important: when you develop a module (that is. *. when PostBack is used in the ascx file, you need to explicitly define the page in the page load or init method. enableviewstate = true; because the default value is false, viewstate is used to avoid unnecessary use.

 

In mojoportal, all pages in the menu do not actually correspond to An ASPX file. In fact, only one page is processing all the requests. This page is default. aspx. This page displays the corresponding page according to the pageid In the parameter. So the URL format is default. aspx? Pageid = X, X represents the corresponding pageid in the database. We also use friendly URLs in the system, so you may not see default. aspx? Pageid = x. You can see files such as home. aspx or forum. aspx.

 

Controls loaded to the page are loaded based on data in the database. For more complex modules, such as forums, modules may be connected to related aspx pages, such as forumview. aspx. These pages are actually existing pages. You can regard modulecontrol as the entry point of a module, and the module may not be limited to modulecontrol. Therefore, the module can have many support pages, so you can build complicated modules. Modulecontrol must know how to connect to the corresponding support page.

 

To create a module, right-click a folder in Vs and choose "add"-"New Project"-"Web user control". Then you need to modify the file, inherit from mojoportal. web. sitemodulecontrol. (If your control does not need to be loaded by multiple pages, you do not need to inherit from sitemodulecontrol ). if your module requires related support files, you need to make them inherit from mojoportal. web. mojobasepage.

 

If you want to build your own modules, the recommended method is to build your own solution, so that after the mojoportal upgrade, your work will not be wasted.

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.