Hi amar,
Refer below sample.
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<script type="text/javascript">
function ValidateEmail() {
var regx = /^([\w-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([\w-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/;
var email = document.getElementById("txtEmail").value;
if (!regx.test(email)) {
alert("Invalid email address.");
}
else {
alert("Email address is valid.");
}
}
</script>
</head>
<body>
<input name="txtEmail" type="text" id="txtEmail" />
<input type="button" value="Validate" onclick="ValidateEmail();" />
</body>
</html>
Demo
You can change the html control with the below asp controls.
<asp:TextBox ID="txtEmail" runat="server" />
<asp:Button Text="Validate" runat="server" OnClientClick="return ValidateEmail();" />