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.0AJAX - Other Modules affected by call backAJAX - Other Modules affected by call back
Previous
 
Next
New Post
12/18/2008 6:45 AM
 

OK, I hope I can explain this clearly enough.

My Portal has a number of custom modules I have created.

All modules are set to use AJAX via the "Support Partial Rendering" checkbox being ticked.

I am noticing the following behaviour:

My currency converter module simply accepts a numeric input and when the user clicks on the convert button, it outputs the currency conversion in a separate text box.

I have AJAX switched on for this module and sure enough I do NOT see a postback within IE

However what I DO see is that the Page_Load of each of my other modules IS invoked????

So on one hand AJAX is working in that I don't see a postback in IE, but on the other hand each of my other modules is executing code.

Is this behaviour correct?

Is this because DNN works on the basis of a single Default.aspx page with lots of .ascx user controls inserted?

I was kind of hoping that if I had AJAX switched on, then when a user uses my Currency Converter module, only the code in that module would be affected?

 

Please let me have your thoughts.

 

 


Blue & White hooped blood runs through my veins!
 
New Post
12/22/2008 9:54 AM
 

Hellooooooooooooooooo, anyone out there???????

 

Has anyone else seen this happen?

Is this really the way that AJAX works in DNN?

Or have I got a problem?

 

Come on guys, someone must have an idea/opinion???


Blue & White hooped blood runs through my veins!
 
New Post
12/23/2008 12:13 PM
 

This is the way AJAX works in general (MSAJAX, that is).  It performs a "Callback" to the server but that callback still processes the entire page lifecycle from start to finish but then when it returns the results the ScriptManager (updatepanel) knows how to selectively parse out the material belonging only to itself.  This is a tradeoff you make when using the MSAJAX UpdatePanels.  On the one hand it is way easier to do but on the other hand it is terribly inefficient AND could affect other modules on the same page.

I have recently started moving away from UpdatePanels altogether for that reason, amongst others.  I expose all needed functionality via webservices (and secure them in a method similar to what Michael Washington suggests here: http://www.adefwebserver.com/DotNetNukeHELP/Misc/Dotnetnuke_Secure_AJAX_webservices.htm) and then use the ScriptManager to create a proxy for my webservice so I can call the methods using the MSAJAX framework.  I then use jQuery typically to perform any DOM manipulation.  I have thought about not using the ScriptManager at all since it loads extra javascript bloat in there but other things on the page are already using it/loading it, so I might as well.

At any rate I have seen a HUGE increase in performance on my AJAX apps not to mention a HUGE decrease in network resources.  Using an UpdatePanel, remember, is a full postback for all intents and purposes.  That means all the v13wstat3, ControlState, etc is being posted back and then the entire page is being returned back in the Response object.  If you have a complex module on the page you could be looking at a request of 100kb+ and a response 200kb+.  That exact same page could be filtered down using pure AJAX methodologies and you'd see 200bytes request and maybe 5kb response.  Booyah! (i'm talking from experience here... I saw results like that on my apps).

So to come full circle back to your question about ideas/opinions.  I think UpdatePanels are great when you want to just hurry and slap something out there.  The problems are that they can affect other modules (which btw, means those other modules are likely poorly programmed since they are responding to a PostBack) and that your network bandwidth gets hammered.  If you want to have a clean approach that doesn't affect anything else then go pure AJAX.  Rick Strahl has some good tutorials on his blog about using webservices and AJAX (not specifically DNN, but good nonetheless).

Good luck.


-- Jon Seeley
DotNetNuke Modules
Custom DotNetNuke and .NET Development
http://www.seeleyware.com
 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0AJAX - Other Modules affected by call backAJAX - Other Modules affected by call back


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