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.0Pass parameters to ContentPane ModulePass parameters to ContentPane Module
Previous
 
Next
New Post
2/6/2008 6:04 PM
 

 

I have TreeView in a Module on the LeftPane when I click on the Node I want to pass the data from that node to a Module in the ContentPane

My question is how to I pass a value from LeftPage Module to a Module in the ContentPane?

 

Thank You

 

 

 

Peter

 

 

 

 

 

 
New Post
2/6/2008 8:50 PM
Accepted Answer 

Hi there. You might wanna check out IMC (Inter-Module Communication). I can't seem to find any article on it though, but I think this might help.

Basically, you would want to make the module in the ContentPane to implement IModuleListener, and module in your LeftPane to implement IModuleCommunicator (Forgive me if I'm wrong about the class name ). This way, your module in the LeftPane could fire up events, and the module in ContentPane could catch it. I'm not sure whether there's better way to do this, anyone?

Anyway, I hope that helps

Best Regards,

Ferry Mulyono

 
New Post
2/6/2008 9:58 PM
 

If you want to passing some value, the common approach are using querystring or IMC. Querystring is the easiest way and simple to do. But you can't pass a complex data type, just string or object that you should serialize. IMC offer more flexibility but need extra code to implement. Since IMC can be 'read' by other module in the same page, then you should provide unique name for every process and catch that value from other module that implement IMC too.

You can alternatively using Javascript to do like that. But make sure the name of your control is unique. Because at runtime everything in client can be accessed using javascript.

I give you an example, if you have ModuleA and ModuleB. You put ModuleA in LeftPane and ModuleB in ContentPane.

In ModuleA you have a javascript function like below :

function Show() {

    document.getElementById("spanInModuleB").innerHTML = "Some value";

}

And in ModuleB you have a span like below :

<span id="spanInModuleB" />

Then ModuleA and ModuleB dan communicate using client side. It's just an alternative. It is often that you should combine with javascript. But once again, this approach is not about passing data as you see in code behind. But if you create an object in javascript, you can directly accessing DOM element in your module and then using Ajax to postback to server. I hope you got the idea.

HTH.

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Pass parameters to ContentPane ModulePass parameters to ContentPane Module


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