hi,
add this script to your aspx page and test
<script language="JavaScript">
var needToConfirm = true;
window.onbeforeunload = confirmExit;
function confirmExit() {
if (needToConfirm)
return "Are you sure to leave this page?";
}
</script>
hope this help you.