Search the web
Sign In
New User? Sign Up
AJAX_2-0 · AJAX 2.0 = XHTML DOM + Remote JavaScript
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Want to share photos of your group with the world? Add a group photo to Flickr.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
AJAX - ASP.NET empty response problem   Message List  
Reply | Forward Message #130 of 136 |
Hi. I am new in this group.
I am having a problem with AJAX with ASP.NET (both Framework 1.1 and
2.0)
I have some custom controls (such a Grid) that uses reflection to
get data form buness objects (such as the ObjectdataSource does, but
this is my implementation).
When it finishes rendering all contents, it stores it self in
session to be retreived in later AJAX refresh calls.
AJAX calls (which code I paste below) calls a "GridRemote.aspx" page
that gets the parameters to retreive the grid from session, then
render it, and finally returns the contents to be returned by the
ajax call. Then a JS function replaces the grid code with the new
one and that's it... magic is done ;-)
The problem is that after certain time or after several calls (I am
not sure which events starts producing the error. Surely the time
the most cases) I receive an empty AJAX response. Every other AJAX
call behaves the same after that.
Debugging Javascript, the call is made ok. I get the 4 redystate and
the 200 request status, but the responsetext is '' nothing...
Debugging ASP.NET, the AJAX request is detected in global.asax, but
no other code is executed. Neither the GridRemote.aspx Sub New, nor
any other peace of code (that's why AJAX gets nothing).
Afer refreshing the whole page, I check the session Id and it's the
same... so... no wonder what's going on...
The only action that fix this situation y restarting IIS.
żAny help please?
Thanks

AJAX Code:
Ajax.getDataReturnText = function(url, callback)
{
var XMLHttpRequestObject = false;
if (window.XMLHttpRequest)
{
XMLHttpRequestObject = new XMLHttpRequest();
}
else if (window.ActiveXObject)
{
XMLHttpRequestObject = new ActiveXObject("Microsoft.XMLHTTP");
}

if(XMLHttpRequestObject)
{
XMLHttpRequestObject.open("GET", url, true);
XMLHttpRequestObject.onreadystatechange = function()
{
if (XMLHttpRequestObject.readyState == 4 &&
XMLHttpRequestObject.status == 200)
{
callback(XMLHttpRequestObject.responseText);
delete XMLHttpRequestObject;
XMLHttpRequestObject = null;
}
}
XMLHttpRequestObject.send(null);
}
}





Wed Jul 4, 2007 5:48 am

leonardog
Offline Offline
Send Email Send Email

Forward
Message #130 of 136 |
Expand Messages Author Sort by Date

Hi. I am new in this group. I am having a problem with AJAX with ASP.NET (both Framework 1.1 and 2.0) I have some custom controls (such a Grid) that uses...
Leonardo Ghigliani
leonardog
Offline Send Email
Jul 4, 2007
5:48 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help