> <script type="text/javascript" > $(document).ready(function () { > $("#<%= this.txtUsername.ClientID %").blur(validatePassword); > $("#<%= this.txtPassword.ClientID %").blur(validatePassword); > $("#<%= this.txtRetypePassword.ClientID %").blur(validatePassword); > }); > > function validatePassword() { > var username = $("#<%= this.txtUsername.ClientID %").val(); > var password = $("#<%= this.txtPassword.ClientID %").val(); > var retype = $("#<%= this.txtRetypePassword.ClientID %").val(); > var empty = (username.length == 0) || (password.length == 0) || (retype.length == 0); > > var valid = !empty && (password == retype); > > if (!empty && !valid) { > $("#password").show(); > } > else { > $("#password").hide(); > } > > $("#txtLogin").attr('disabled', !valid); > } > </script > > <div id="password" style="display:none;"The entered passwords do not match.</div >Thanks a bunch Paul, this is helpful.. I also found this Validation plug in for jquery that is really nice.
Page.ClientScript.RegisterClientScriptResource(GetType(), "~/scripts/EnrollmentValidation.js");Since I am using Telerik, there is a RadScriptManager on the outside Master page but it doesn't appear I can register a script with the script manager since it is in the master.