Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0How to communicate between two different modules?How to communicate between two different modules?
Previous
 
Next
New Post
2/28/2007 6:25 PM
 

Hi,

I need to Navigate between two entirely different modules within DNN. I have used the starter kit to set up the website, then I used the new "Precompiled Module" template to add two different projects to the solution. The physical location of the files are both under DeskTop Modules of the website, in separate folders.

One of the forum posts I read said I could use IMC so I reviewed everything I could find about IMC (Inter Module Communication), even a video from TrainCert. However, that didn't seem to help.

I put the module that I'm navigating to on a new page that had a tabid of 54, and used "NavigateURL(54)" but nothing happened. I tried giving the module I'm navigating to a 'ControlKey'  but that didn't work and from the documentation I have found it appears that 'NavigateURL(ControlKey) would only work if the ascx is in the same module, not an entirely different one.

So, I could go about this two ways: I could navigate to a new page that I've already installed the second module on, or I could load the new ascx into the current page. I'm ok with both ways if you have any ideas.  Please give a small example of the actual code if its available if you reply to this post. Sometimes I have trouble finding documentation even when I know what what I'm looking for so the example or a url would be excellent.

Thanks for the help....

Tundra...

 
New Post
2/28/2007 8:40 PM
 

Perhaps more information would help. Why do you want to navigate from one module to another? DotNetNuke provides navigation already. Can your user simply navigate themselves? If the modules are so tightly integrated should the functionality simply be in one module?



Michael Washington
http://ADefWebserver.com
www.ADefHelpDesk.com
A Free Open Source DotNetNuke Help Desk Module
 
New Post
3/1/2007 11:38 AM
 

I would like to use the DotNetNuke navigation. That's what my post was about. But the navigation documentation that I have found and tried to use had not worked when I wrote the post yesterday. This morning I found one way to use NavigateURL() that worked. I used "Response.Redirect(NavigateURL(54))" and that took me to the target page. However using that way would require me knowing ahead of time what the tab id was for that page (and maybe hardcoding as well). The targetted ascx will always show the same data no matter where it might reside on the DNN site, so the actual page or tab that it's on won't matter.

The User won't navigate by themselves because they'll click an item in a grid and then that link will take them to the target page with only the specific data showing on the target page depending on the row that was clicked on the original page. Maybe that target page would be included in the same module but in this case I am writing an experimental project in anticipation of a much larger project.

The larger project I had in mind will have separate modules that users will purchase, but that will interact with each other depending on what they have bought. For instance there may be an Inventory module and a Shipping module. I would want a user to go to an Inventory item and maybe click a link that says, "Ship It", which would then take them to the Shipping module. It wouldn't be good programming practice to have to put all the Shipping code in with the Inventory code, but if nothing else it would be a major headache if there were 25 modules and all the source code had to be mixed up together.

But what if I wanted to compile and sell the Shipping module separately from the Inventory module. If I wrote the Shipping module well it could be a stand-alone program for someone from a Postal Store, for instance, but if the the customer were a warehouse they might buy the Inventory module. In that case the Inventory and Shipping module would need to communicate and be able to navigate between each other.

There should be a way to communicate and navigate between different modules (without hardcoding Tab IDs, etc.)  with the program in charge and not the User. If the program knows what's next then it should take the user there, not require the user to go there themselves (which might require telling them where to go, thus introducing the possibility of User Annoyance because they didn't see the instructions). Programs were introduced to make less work for a user, so I would like my programs to do everything for the user except pour their coffee. If I could figure out how to pour the coffee maybe I'd do that too.

I hope that I've given you enough info. Thanks for the help,

 

Tundra

 
New Post
3/1/2007 9:43 PM
 

If you segment your data by portal rather than module instance you should have no problem.

What I mean is that the Blog module is portal wide. You can place multiple instances of the Blog module on various pages in a portal, but when you click on the link to "View My Blog" it shows you the data for the current user in the current portal. It does npt care about the ModuleID (module instance).

Using your example, a user first has your inventory module and manages their inventory. When they buy the shipping module they place the module on the page and the shipping module allows them to choose an inventory item that is in the current portal.

The in the current portal will work. If you want to "show inventory attached to a particular ModuleID" (module instance) then you encounter a more difficult configuration.

I would not recommend using module instance because what if your user accidentally deletes the module? When they place the module on the page again it will have a new instance. Any other modules tied to the old module instance wont work.

ModuleID (module instance) is a very powerful feature of Dotnetnuke and works great for modules such as the Survey Module. It keeps each survey separate. For most business applications however you only care about portal wide data segmentation.

Because your needs are special, you do not know what modules a person will have installed, the dynamically loaded control method might work. You can have a master "control" module that looks in your database table to see what other modules are installed and the name of their .ascx control. it will then display a proper menu item and when clicked it will dynamically load the control (passing any relevant parameters)

You can download an example here: MultiViewSample.zip.

View the source code: View.ascx / View.ascx.vb

 



Michael Washington
http://ADefWebserver.com
www.ADefHelpDesk.com
A Free Open Source DotNetNuke Help Desk Module
 
New Post
3/2/2007 6:35 PM
 

Thanks for the help. I'll consider the Portal idea, but that is adding a layer of complexity that I'm not sure I want to get into.

 I tried the dynamic loading of controls and it works partially. It will load the control the first time, then when I choose a different control from the drop down it will sometimes load, but at least by the third time it will give me an error about not being able to load ViewState, saying that the viewstate must be the same for before and after the postback. I was using a Telerik RadGrid in the control that gave me the problems, and once there was an AJAX error. I disabled the AJAX in the grid but I was still getting the viewstate error. I stopped at that point, I just wanted to see if the dynamic loading would be workable.

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0How to communicate between two different modules?How to communicate between two different modules?


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out