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.0Problem using XMLHttpRequest in DotNetNukeProblem using XMLHttpRequest in DotNetNuke
Previous
 
Next
New Post
4/7/2009 3:58 PM
 

I have an asp.net server control I developed that displays a server folder browser. 

When a user clicks on a folder it makes an XMLHttpRequest to a bogus .aspx page (named ServerFolderBrowser.aspx) that is setup to be intercepted by a custom HTTP handler.  It all works perfect when not in a DNN site. 

I added this server control to a custom DNN module I created though and it does not work.  My custom HTTP handler never gets hit that I can tell and what is returned in the responseText property is the html of the page I made the call from.  There are no other HTTP handlers in the web.config that should conflict with mine so fas as I can tell.

I know DNN does some AJAX handling of its own so I looked at the Client API callback documentation some but it wasn't of much help and there were no good examples.

What do I need to do to make a regular AJAX call via JavaScript work in DNN?

 

 
New Post
4/9/2009 10:14 AM
 

Well I figured it out.  Apparantly there's an HTTP module or something in DNN that once you're on a module url, it goes to that page no matter what the page on the ending page is.  For ex:

http://localhost:4312/DotNetNukeCustom/Products/tabid/56/ctl/Module/ModuleId/385/Default.aspx

You can do: http://localhost:4312/DotNetNukeCustom/Products/tabid/56/ctl/Module/ModuleId/385/AnyValueHere and it will still go to the same page.

So basically I just had to get the relative path to the virtual root and make a call to it and it works perfectly now (I set a JS variable with the path):

var ajaxCallbackURL = "'" + VirtualPathUtility.ToAbsolute("~/") +"ServerFolderBrowser.aspx'"; //returns /DotNetNukeCustom/ServerFolderBrowser.aspx

I have the following http handler setup in the web.config:

<add verb="*" path="ServerFolderBrowser.aspx" validate="false" type="SoutheastSolutions.Web.ServerFolderBrowserHTTPHandler"/>

 

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Problem using XMLHttpRequest in DotNetNukeProblem using XMLHttpRequest in DotNetNuke


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