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

HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...How to make a module update on page_reload (caused by event fired from other module)?How to make a module update on page_reload (caused by event fired from other module)?
Previous
 
Next
New Post
5/19/2006 8:43 AM
 
Hi,
In module#1 I create a new object and write this to a database by clicking a button.
in module#2 I have a datalist which shows the name of all the stored objects.

The first thing in the module#2.page_reload is an "update list" method which fetches information about the stored objects in the database. Also I have a label in module# that displays a timestamp. When I create a new object in module#1 the timestamp in module#2 gets updated. However, the context of my datalist doesn't reflect that I've added a new object. When I click "refresh page" at the top of the browser the change is shown, but I want the change to show as soon as I click the button in module#1. How do I get module#2 to show that the context of datalist has changed?
I guess this has something to do with the communication between client and server... that I have to tell the server to repaint module#2.... but how!?
(I'm very new to asp so please, if you have a suggestion don't suggest doing something too  AJAX-like. I wan't it plain and simple)
Thanx!
Johannes 

 
New Post
5/21/2006 8:24 AM
 

Johannes,

Am I right to assume that module #1 and module#2 uses the same data?

I will bet that the code of module#2 looks something like:

Sub page_load
   if (not ispostback) then
      
BindData() ' Calling your database routines to load the data
   end if
end sub

This is normally fine having independend modules. In your case you will have to be sure that  your data is refreshed on each postback.

How do you change the label of your timestamp? Using javascript? It will not be posted back!

 
New Post
5/21/2006 8:58 AM
 
Hi Stefan,
Thanks for replying!

Yep, module#1 and module#2 fetches data from the same table in the DB.
I do my timestamp by doing a Sometextbox.text = "updated: " +
 DateTime.Now.ToLongTimeString();
in the page_reload (I'm writing in c#).

I think that I'm onto something which seems to work. I've just discovered the existence of the "onPreRender" Event.
If I execute my databinding in here both module#1's and module#2's controls get updated clientside - which is what I want.

I've been messing a bit around with the dotnetNuke ClientApi and so, also javascript, however, sometimes things seem to work and other times not. As I'm just diving into ASP and DNN, I've decided to wait a bit trying to implement javascripts and client callbacks
 as  I'm often completely blank as to why my stuff isn't working. Hopefully, this will change when I get more into the workings of DNN and ASP.NET
However, If you know a good reference to how the DOM stuff works/functions and how the availability of the DOM tree is associated with page loading, let me know...
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...How to make a module update on page_reload (caused by event fired from other module)?How to make a module update on page_reload (caused by event fired from other 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