XMLhttp request problem

S

SudhaGSD

Hi all


i am using asp.net v2.0


In one of my page i am calling another page using xml http , this is
working fine but first time only ,


I am sending the request on click of button , when i click the button
second time, it's returning the previous response and it's not even
calling that page again, where could be the problem.


client side (aspx page 1- javascript)


var http=new ActiveXObject("Msxml2.XMLHTTP");
http.open("GET","Gensparql.aspx",false);
http.send();
if(http.readyState == 4)
{
if(http.responseText!=null && http.responseText!='' )
{
//my process
}



}


server side (aspx page 2)

Response.Clear();
Response.ContentType = "text/xml";
Response.Write(retVal);
Response.End();


//second time returning same previous output and not calling the aspx
page 2
Hope u understand my problem,i am in urgent, Thanks in advance
 
M

Milsnips

i had the same problem! the way i solved it was the following:

in the page_load of the aspx page with the javascript, add this:

--------------------
Response.Cache.SetCacheability(HttpCacheability.NoCache)
---------------------
seems that it holds the first call in cache, might be some bug or something,
but anyway this doesnt allow it to store in cache, therefore calling the
aspx page everytime.

hope it works,
Paul
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,019
Latest member
RoxannaSta

Latest Threads

Top