How do you get client-side script to execute on an ASP.NET postback? (from an UpdatePanel)

后端 未结 1 1796
有刺的猬
有刺的猬 2020-12-07 06:30

Basically I want to get some javascript to be sent back to the client and executed from a postback inside an UpdatePanel. Furthermore this is inside of a reusable WebContro

相关标签:
1条回答
  • 2020-12-07 06:48

    If I understand correct you look for the endRequest event - to avoid the onload of your image. With this code you get the event of your panel update on javascript side.

    var prm = Sys.WebForms.PageRequestManager.getInstance();    
    prm.add_initializeRequest(InitializeRequest);
    prm.add_endRequest(EndRequest);
    
    function InitializeRequest(sender, args) {      
    }
    
    function EndRequest(sender, args) {
    }
    
    0 讨论(0)
提交回复
热议问题