jquery validation not working after postback in asp.net
I am using jquery validation plugin in my asp.net page. In the codebehind if image size is big i am displaying an error in the aspx page. When I click "Register" button again the page is not getting validated again.
Can anybody help?
<
script
type
="text/javascript">
$(document).ready(
function
(){ $(
"#<%=btnRegister.ClientID %>"
).click(
function
()
{
$(
"#aspnetForm").validate( {
rules:{
<%=txtName.UniqueID%>:{required:
true }
},
messages:
{}
});
});