OnClick not working when i use both Onclick & OnClientClick

前端 未结 5 1600
抹茶落季
抹茶落季 2020-12-09 19:17

With this code, i try to Close a Window (the way i\'m doing it works) but i have also an Onclick event which is ignored!



        
5条回答
  •  死守一世寂寞
    2020-12-09 20:02

    I ran into this problem and using UseSubmitBehavior="false" nearly did the trick. Be sure to have your OnClientClick call set up correctly:

    My code was using OnClientClick="return ValidateSearch();" which is incorrect. It should just be

    
    

    See the Source here (and tell them thanks!)

    If it is set up incorrectly, the OnClick function will not fire.

提交回复
热议问题