Hi all,
I am using bootstrap for my asp.net application.
And for validating controls am using Formvalidation plugin.
It in not working after any post back.If I removed my update panel it is working fine.
How to makes it work properly with update panel also.
I tried the below code.
<script type="text/javascript">
Sys.WebForms.PageRequestManager.getInstance().add_initializeRequest(instance_initializeRequest);
function instance_initializeRequest(sender, args) {
if (!Test()) {
args.set_cancel(true);
}
}
</script>
<script type="text/javascript">
function Test() {
$(document).ready(function () {
$('#defaultForm').formValidation({
message: 'This value is not valid',
icon: {
valid: 'glyphicon glyphicon-ok',
invalid: 'glyphicon glyphicon-remove',
validating: 'glyphicon glyphicon-refresh'
},
fields: {
'<%=txtAresinSqft.UniqueID%>': {
validators: {
integer: {
message: 'The input is not a valid phone number',
country: 'IN'
},
notEmpty: {
message: 'The phone number is required and can\'t be empty'
},
}
}
}
});
});
}
</script>
<script type="text/javascript">
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(Test);
</script>
Now it is working fine . But one new problem came like no events are firing .
Please help .last 3 days I stucked in this problem.
Thank you
Subin ks