I'm writing an ASP.NET webforms app, and I'm using jQuery for my AJAX calls. This is working well, but on some occasions, the $.getJSON call is causing a full page postback. I am not using the ASP.NET AJAX library anywhere in the app. I can't reproduce the problem on a consistent basis, and am not sure what is causing it. Here is the jQuery code I am using. Anyone run across this before? Is is possible the previous AJAX call might not have completed, and requests are overlapping?

2 Answers
2

If it's a client-side click handler on a control like a Button, you need to be sure to call preventDefault(). Otherwise, the browser will submit the form and cause a postback, even while the AJAX callback is in progress.