After Post Back my jQuery code not working

前端 未结 2 954
礼貌的吻别
礼貌的吻别 2020-12-19 18:50

I have server side button. First time jquery is working fine but next time jQuery not wroking. I am using jQuery inside Update Panel.

Below is my Jquery code.

2条回答
  •  执念已碎
    2020-12-19 18:58

    Your initialization will run only on document ready (not on postback). Since you place your control inside UpdatePanel, anything will updated after postback.

    Try with the below suggestion

    You need to recreate the Jquery Codes on postbacks like given below

    
    

    this is the solution got once i got the same issue and worked fine for me..check

    Updated:

    If above code give error like Sys undefined then try below code.

    
    

提交回复
热议问题