Please refer this code.
Run this demo in IE browser to see the alert message.
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<script type="text/javascript">
window.onload = function () {
var ua = navigator.userAgent;
if (navigator.appName == 'Microsoft Internet Explorer') {
alert('Please Use Firefox or Google Chrome to browse the website.')
return;
}
}
</script>
</head>
<body>
<form id="form1" runat="server">
</form>
</body>
</html>
Demo