I'm trying to find out how to keep a page from posting back in an OnResponseEnd event handler. The following is my code for the event hanlder:
I see the alert box when the condition is met, but the return false statement does not prevent the page from continuing to process server-side code. I want it to stop right there-- any suggestions?
//event called after server code executes
function ResponseEnd(sender, args) {
var hid = document.getElementById("<%=hidReturn.ClientID %>"); //get value from hidden control which is set by server code
if (hid.value == "True") {
alert("You don't have all the required documents");
return false;
}
else
return true;
}