Execute javascript function after asp.net postback without Ajax

前端 未结 5 507
挽巷
挽巷 2020-12-16 11:08

I wish to execute a javascript function after asp.net postback with out using ajax.

I\'ve tried the following in my even method with no luck:

Page.Cl         


        
5条回答
  •  不知归路
    2020-12-16 11:39

    This person had same problem i think and solution by him worked for me too :

    http://forums.asp.net/t/1121450.aspx?HOW+TO+run+javascript+on+each+partial+postback+

    And solution is simply use ScriptManager class function: ScriptManager.RegisterStartupScript(this, typeof(Sections), "Initialize", "initialize();", true);

提交回复
热议问题