I would really like use the jQuery Validation plugin in my ASP.NET Web Forms application (not MVC). I find it easier than adding asp validators everywhere and setting the co
A great way to do this is to use:
<%= textbox.Name %> or <%= textbox.ClientId %> whenever you need to reference a server item.
i.e.
var phoneNumb = $('#<%= tPhone.ClientID %>').val();
or
$("#signupForm").validate({
rules: {
<%= username.Name %>: {
required: true,
minlength: 2
}, },
messages: {
<%= username.Name %>: {
required: "Please enter a username",
minlength: "username at least 2 characters"
},
}.
.......