Learn More





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

HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesupdate updatepanel of module B from module Aupdate updatepanel of module B from module A
New Post
4/7/2015 4:29 PM

How do I update ASP.NET UpdatePanel of module B from module A?

Or same problem rephrased: how do i find control of another module from my module? i have moduleid.

(calling UpdatePanel.Update  will refresh updatepanel.)


I need this for this scenario:

 module A is search module.

module B is products module.

i postback search values (search term, filters etc). i want to save search into session, not url . and i want to only update module B's updatepanel (show new list of products based on search) when search is submitted, not refresh whole page (for speed).

New Post
4/11/2015 7:40 AM
Because modules are dynamically loaded and are not considered to be part of the same update tree - its not that easy to directly locate "the other" control from the server side.

What you would need to do in this case most likely is look at triggering the update from the CLIENTSIDE using javascript.

Have a look at this article that talks about ways to force a panel update from the client side.

New Post
4/11/2015 7:57 AM
But for what its worth - you could do the sort of thing you are talking about entirely on the client site using jquery and some ajax calls without the overhead of using the updatepanel system at all. Then you would not really even need to use session storage - which in itself adds another layer of overhead.

In Module 1 - collect your search parameters - then have the search button make an ajax call to a webservice - and use the results of that webservice call to directly update a placeholder from Module 2

As Javascript is global by default if you declare a javascript block in module 2 like:

var globalModule2 = null;
globalModule2 = $find('<%= Module2TargetPlaceholder.ClientID %>');

you should then be able to reference it later in the page cycle from Javascript code in Module1 and inject in the results of the ajax call to populate the module2 result area.



New Post
4/19/2015 8:00 AM
Thanks. I'll probably go with __doPostback (updatePanelClientID) or query parameters. I do what u describe, to generate html with javascript and ajax, but only for cart, product list would be too big for that in my opinion. i have seen sites that load all content like that and i dont like them, too much load on javascript engine i guess, page doesnt load too smooth.
New Post
5/11/2015 7:58 AM
I ended up using DNN's IModuleCommunicator, help:
it's very simple:
when listener module received message from communicator module i rebind listener module's user contorls and update updatepanel of listener module.

I tried refreshing uipdatepanel from javascruipt but was having problems with asp. net complainign about invalid postback parameters.
HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesupdate updatepanel of module B from module Aupdate updatepanel of module B from module A

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.
Try Evoq
For Free
Start Free Trial
a Demo
See Evoq Live
Need More Information?