任何人都可以告诉我如何在asp.net嵌套的masterpage中使用jquery。我有我的主要页面,我已经添加了链接到jQuery的libaray和验证框架。然后我创建了另一个带有一些样式的主页,并基于该主页创建了一个aspx页面。使用jQuery与嵌套的主页
如何将验证框架附加到我的页面中的文本框?
我已经试过
$("#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 *"
}
}
});
但是什么也没有发生。任何人都可以将我指向正确的方向吗?