function Validation() { var txtDob = document.getElementById("<%=txtDob.ClientID%>").value; var returnVal = "true"; if (txtDob != "") { if (isDate(txtDob) == false) $("#<%=txtDob.ClientID%>").addClass("txtValidate"); else $("#<%=txtDob.ClientID%>").removeClass("txtValidate"); } if (returnVal == "true") return true; else return false; }
<asp:TextBox ID="txtDob" runat="server" AutoPostBack="true" onchange="rerurn Validation();" OnTextChanged="txtExample_TextChanged"></asp:TextBox>
protected void txtExample_TextChanged(object sender, EventArgs e) { // If the client side function returns true then only this will execute.. }
returnvalue
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)