Using jquery with nested masterpages
- by diver-d
Hi everyone,
Can anyone show me how to use jquery in an asp.net nested masterpage. I have my main masterpage where I have added the link to the jquery libaray and also the validation framework. I have then created another masterpage with some styling and created a aspx page based on that masterpage.
How can I attach the validation framework to textboxes within my page?
I have tried
$("#aspnetForm").validate({
rules: {
<%=txtPostCode.UniqueID %>: {
minlength: 2,
required: true
},
<%=txtContactEmail.UniqueID %>: {
required: true,
email:true
}
}, messages: {
<%=txtPostCode.UniqueID %>:{
required: "* Required Field *",
minlength: "* Please enter atleast 2 characters *"
}
}
});
However nothing happens. Can anyone point me in the right direction?