Not exactly sure why this is happening, but upon click of a button I call a JQuery Ajax control, after that I do not want to continue submitting the form, but before the page gets still submitted.
<asp:ImageButton id="btnContinue" OnClick="btnContinue_Click" runat="server" OnClientClick="return false;" />
and the jQuery:
$("#<%=btnContinue.ClientID%>").click(function() {
var currentpickupLocation = document.getElementById("<%=ddlPickupLocation.ClientID %>").value;
var currentpickupDate = document.getElementById("<%=txtPickupDate.ClientID %>").value;
var currentCulture = "<%= GetCulture() %>";
var params = $.toJSON({pickupLocation: currentpickupLocation, pickupDate: currentpickupDate});
$.ajax({
type: "POST",
url: "LocationService.asmx/GetBlackoutDates",
data: params,
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function(locations) {
return false;
}
});
});