<head runat="server"> <script type="text/javascript"> function Validateform() { var msg = ""; if (document.getElementById("txtfirst").valueOf == "") { msg += "Enter Firstname\n"; } else { var ex = /^[a-zA-Z]/; if (ex.test(document.getElementById("txtfirst").valueOf == false)) { msg += "please enter only characters in first name\n"; } } </script> if (msg == "") { return true; } else { alert(msg); return false; } <td colspan="2"> <asp:Button ID="signupbtn" runat="server" Text="Sign Up" onclick="signupbtn_Click" OnClientClick="return Validateform();" Class="button" /> <asp:Button ID="cancelbtn" runat="server" Text="Cancel" onclick="cancelbtn_Click" Class="button" /> </td>
if (document.getElementById("txtfirst").value == "")
if (document.getElementById("txtfirst").valueOf == "")
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)