Search code examples
jqueryasp.netajaxinternet-explorerashx

IE Ajax not working properly, get different value between jQuery.Ajax and ashx browser result


I have an Ajax call via JQuery.Ajax, Chrome and Firefox works fine. but for IE it is not working properly. Following screenshot is what I have in IE Debug:

IE Debug http://img441.imageshack.us/img441/2301/capturerxa.png

On the right side the data shows the JSON value is ZERO. However in IE I ping the url of Ashx with proper parameter, it shows correct result:

Ashx result http://img692.imageshack.us/img692/8079/capture2gu.png

Can somebody tell what's error inside this?


Solution

  • This make me think of a cache problem - happen often with IE and ajax. Could you give this a try (put it above your ajax call) :

    <script type="text/javascript">
       $.ajaxSetup({ cache: false });
    </script>