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.