<html xmlns="http://www.w3.org/1999/xhtml" ><head runat="server"> <title>Untitled Page</title> <script type="text/javascript" src="jquery-1.2.6.js"></script> <script type="text/javascript"> $(document).ready(function() { $('#Button1').click(function() { var vtxtEmail = $('#txtEmailID').val(); if ($.trim(vtxtEmail).length == 0) { alert('Plz enter valid email address!'); e.preventDefault(); } if (TovalidateEmail(vtxtEmail)) { alert('This is not valid email id'); } else { alert('Invalid Email Address'); e.preventDefault(); } });});function TovalidateEmail(vtxtEmail) { var filterexpression = /^([\w-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([\w-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/; if (filterexpression.test(vtxtEmail)) { return true; } else { return false; }}? </script></head><body> <form id="form1" runat="server"> <div> <asp:TextBox ID="txtEmailID" runat="server"></asp:TextBox> <asp:Button ID="Button1" runat="server" Text="Button" /> </div> </form></body></html>