Updating separate module on same page . . .
Last Post 07/10/2007 1:20 PM by Benjamin Clements. 8 Replies.
Author Messages
Benjamin Clements
Nuker
Nuker
Posts:13


--
06/27/2007 12:03 AM  

I may be missing the obvious, but how do you programmatically update the data on a separate module on the same page?  For example, in one module, I click on a button that adds an item to a table.  In a separate module on the same page, I would like to show the newly added item.  Therefore, what is the best way to refresh the contents of just a single module on a page?   

I guess this would be a similar type of situation as when one module is a shopping cart and the other module is a list of items that each have a button to allow that item to be added to the shopping cart.  Then what is the best way to show the live, up-to-date contents of the shopping cart without refreshing the entire page?

Thanks.

Benjamin Clements
Nuker
Nuker
Posts:13


--
06/29/2007 1:26 PM  
Does anyone know of any good tutorials on data interaction between modules on the same page?

Thanks.
Joseph Craig
DNN MVP
Posts:11667


--
06/29/2007 1:47 PM  
I don't know of any tutorials on this issue, but some quick web searching found references to DotNetNuke.Entities.Modules.Communications.IModuleCommunicator. So, the framework clearly does have this capability, and the Blog and Repository modules are multi-module in nature.

This is clearly an advanced topic, so I think that you're going to have to do some digging. But, reviewing the code for Repository and/or Blog might be one place to start.

Joe Craig, Patapsco Research Group
Complete DNN Support
Benjamin Clements
Nuker
Nuker
Posts:13


--
06/29/2007 4:36 PM  
Thanks Joe. I'll look at those modules. Since I don't do much programming, it is sometimes hard to just figure out which questions to ask.

I guess one more question is -- when you have 2 modules on the same page, can each control reference any other control on the same page, regardless of what module it is in? If so, does each control maintain the same controlID or does the DNN framework change the controlID to something different once the page is rendered?

Thanks.
Joseph Craig
DNN MVP
Posts:11667


--
06/29/2007 6:06 PM  
If you aren't a programmer, you probably don't even want to look! (As I said, it's a somewhat advanced topic ... even for DotNetNuke programmers.)

I guess my questions is: why are you asking these questions? Is there something that you want to do with DotNetNuke? If you could describe the task/function, then I might have some specific suggestions.

Joe Craig, Patapsco Research Group
Complete DNN Support
Benjamin Clements
Nuker
Nuker
Posts:13


--
07/03/2007 1:00 AM  
No doubt! Because if I find it then I have to do something about it -- then work, work, work!

But seriously, what I am trying to accomplish is this. I have in the first module a gridview that has an "add to favorites" button, that when clicked, adds the current record to a table called myfavorites. The second module is a gridview that lists all the records in myfavorites. I have the page working properly -- however, the 2nd module's gridview doesn't refresh its view of "myfavorites" until I refresh the entire page. So I didn't know if there was a way for one module to call a "gridview2.databind()" for the gridview in another module (or something like that, preferably using AJAX).

Thanks Joe for your time. You and Lee are the reasons I have my subscription!
Benjamin Clements
Nuker
Nuker
Posts:13


--
07/05/2007 5:10 PM  
I may have found an answer -- at least to my situation anyway. I read on Telerik.com that their support suggested tying both modules programmatically to the same RADAjax manager. So this might be possible with the Microsoft AJAX manager built into dnn 4.5x as well. If I get a chance to try this out, I'll let you know . . .
Andy Hock
Nuke Pro
Nuke Pro
Posts:90


--
07/07/2007 3:24 AM  
If you do a search on Inter-Module Communication and DotNetNuke, there are a couple of tutorials about this...there's also some soso info in the DNN Docs, but that didn't help me much either when I read it.

Here are some after a quick search:

http://dnn.bi4ce.com/Support/Forums...fault.aspx

http://forums.asp.net/p/907727/1008635.aspx

http://www.kodhedz.net/Resources/Do...fault.aspx


DotNetNuke and .NET web parts, web services, modules and code snippets.
Benjamin Clements
Nuker
Nuker
Posts:13


--
07/10/2007 1:20 PM  
Thanks alot Andy. I really appreciate you looking into it. I will definitely check out those links.

Have a great day.

Benjamin


---