views:

219

answers:

1

Hello,

I am using ASP .Net 3.5 and trying to invoke a WebService using javascript and Sys.Net.WebRequest.

The service gets invoked for the first time and everything is fine until I try to refresh.

on a refresh th WebRequest object invoke method is called but instead of invoking the service is jumps right to the callback function, as if it's using some cached results.

How should this be solved so on every refresh the service will be executed?

Thanks,

Wineshtain

A: 

Try appending some random number as a parameter to the service URL so that id doesn't get cached.

Jan Hančič
This works, thanks.However is that the 'legit' solution? looks kindof 'ugly'.
Ws
you could set the proper headers on the server if you have control over that. but this is the safest and bullet-proof solution
Jan Hančič