Module Problem

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
6/6/2008 6:36:53 AM
Gravatar
Total Posts 3

Module Problem

Hi!

I have made a simple web project. It has a .ascx file with one combobox, one gridview which shows information from my db and one button. I also have one .aspx file with that .ascx file. It is working correctly. What I want to do next, is to select some rows from my gridview and a option from my combo and click that button to visualize the results. My problem is that I don't know how to organize all of this. I have thought about making another .ascx file (considering each .ascx file as a "module") and inserting it into another aspx file. However, I think it could be another solution, working just with one module (ascx file) and to aspx, but I don't know how.

Thanks for your attention

6/6/2008 7:30:12 AM
Gravatar
Total Posts 18439

Re: Module Problem

Hi,

I really can't help you much with general ASP.NET questions, there is a wealth of information available on the internet and in books that can help you understand how to achieve the results you are seeking and how to organize your work.

I will only point out that in mojoPortal, what I call a a module is the entry point to a feature, its the part the plugs into the page. It is a .ascx file, but it is special because it inherits from SiteModuleControl instead of directly from UserControl.

Normal .ascx files inherit from UserControl and can be used anywhere and even nested within other UserControls where mojoPortal SiteModuleControls should not be nested inside other SiteModule controls, but can have normal UserControls nested within them. UserControls are an easy way to encapsulate functionality that you want to re-use on more than one page.

Hope it helps,

Joe

6/9/2008 1:41:03 AM
Gravatar
Total Posts 3

Re: Module Problem

Hi Joe!

Thanks for your answer. I just wanted to tell you that my ascx file inherits from SiteModuleControl, that's why I consider ascx files as modules (not simple UserControls). I would like to know if you think it is a good idea to do this in one module and the results in another one.

Thanks again.

6/9/2008 5:27:01 AM
Gravatar
Total Posts 18439

Re: Module Problem

No its not a good idea. A feature should have one and only one module control (which is the entry point to the feature), you can use user controls inside the module control but you cannot use other modulecontrols inside it nor should there be any cross talk between module controls. A module control should be self contained and it should not care what other modules are on the page with it, it should not have any knowledge of other modules or dependencies on other modules.

It can link to an external page for results (ie a physical page not a content system page as they are virtual). You can see several features that use external pages including the blog and the forums. You need to pass pageid and moduleid at a minimum to your external page(s) in the query string to keep the context of the current content system page.

Hope it helps,

Joe

6/9/2008 6:38:12 AM
Gravatar
Total Posts 2

Re: Module Problem

I think I have the same problem explained here.

It is direct to develop a module with just one page (the ascx that inherits from SiteModuleControl).

But it is not clear how to develop a module that contains several pages, as Survey module does. Perhaps some example on how to do this would facilitate the development of new modules.

Great work with Mojoportal!

6/9/2008 6:43:55 AM
Gravatar
Total Posts 18439

Re: Module Problem

You have the source code for mojoportal right? That is the example. Study the code for existing features to learn how to implement your own features, the examples for almost anything you want to do is right in front of you in the mojoportal source code.

Best,

Joe

You must sign in to post in the forums. This thread is closed to new posts.