You as a developer cannot prevent it as it is a browser feature and no programming logic can stop that. You can use jQuery modal popups as they are light and easy to use
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>Untitled Page</title>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script src="https://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.9/jquery-ui.js" type="text/javascript"></script>
<link href="https://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.9/themes/start/jquery-ui.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
$("[id*=Button1]").live("click", function () {
var message = "This is a Hello message";
var div = $("#dialog");
if (div.length == 0) {
div = $("<div id = 'dialog' style = 'display:none'/>");
$("form").append(div);
}
div.html(message);
$("#dialog").dialog({
title: "Message from Website",
buttons: {
Ok: function () {
$(this).dialog('close');
}
}
});
return false;
});
</script>
</head>
<body>
<form id="form1" runat="server">
<asp:Button ID="Button1" runat="server" Text="Show message" />
</form>
</body>
</html>
Demo