Javascript not work after firing Updatepanel in asp.net

前端 未结 2 1244
情深已故
情深已故 2021-01-06 02:01

This is my website -> www.superim.ir Its template base is bootstrap and in nav menu I used below code for some effects!

$(\'.productbar .dropdown\').on(\'sho         


        
2条回答
  •  不思量自难忘°
    2021-01-06 02:37

    I faced the same problem. I got help from this link. Execute JavaScript when an UpdatePanel is updated

    protected void Page_Load(object sender, EventArgs e)
    {
        ScriptManager.RegisterStartupScript(
                            upPanel,
                            this.GetType(),
                            "MyAction",
                            "doMyAction();",
                            true);
    }
    
    1. The first parameter is the UpdatePanel
    2. The second parameter is a type parameter
    3. The third parameter, “MyAction”, is a key to identify the script.
    4. script itself.
    5. The final parameter is a flag to indicate whether the ScriptManager should wrap your code in script tags.

提交回复
热议问题