I am using UpdatePanel for asp.net Controls. So, to test it, I use jquery onEachRequest . It also works great.
But the main problem is that it stops performing the DropDownList . So, it does not return data for data recovery. My code is:
function onEachRequest(sender, args) { if ($("#form1").valid()==false) { args.set_cancel(true); } } function pageLoad() { $('#<%= btnPayment.ClientID %>').click(function () { $("#form1").validate({ rules: { <%=txtName.UniqueID %>: { required: true } }, messages: { <%=txtName.UniqueID %>:{ required: "Please enter Name." } } }); var prm = Sys.WebForms.PageRequestManager.getInstance(); prm.add_initializeRequest(onEachRequest); }); }
How to solve this problem?
source share