Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net Web Controls (http://www.velocityreviews.com/forums/f63-asp-net-web-controls.html)
-   -   XMLhttp request problem (http://www.velocityreviews.com/forums/t776997-xmlhttp-request-problem.html)

SudhaGSD 10-12-2005 07:08 AM

XMLhttp request problem
 
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


Milsnips 10-14-2005 10:45 AM

Re: XMLhttp request problem
 
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.No Cache)
---------------------
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

"SudhaGSD" <sudhaoncyberworld@gmail.com> wrote in message
news:1129100880.317706.4350@g14g2000cwa.googlegrou ps.com...
> 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
>





All times are GMT. The time now is 09:40 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.