Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想对 ModalPopUpExtender 进行一些验证。但是即使 ModalPopUpExtender 中存在验证错误,单击确定按钮也在执行回发。
如果 ModalPopUpExtender 上存在验证错误,我如何阻止提交按钮进行回发。
你需要return false;在你的函数结束时写。
return false;
假设你有一个函数
function validate() { //your statements return false;//write this to stop postback. }
还在按钮客户端单击时在函数调用之前放置 return。作为
OnClientClick="return validate()"