Buttons on ASP Repeater as trigger for Update Panel?

后端 未结 1 537
星月不相逢
星月不相逢 2020-12-20 09:13

I am trying to work out with the idea of assigning a trigger for Update Panel Dynamically.


    

        
相关标签:
1条回答
  • 2020-12-20 09:51

    You can assign an async trigger in code behind by looping the Repeater items. This has to be done on every postback.

    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
        }
    
        foreach (RepeaterItem item in justAnID.Items)
        {
            Button button = item.FindControl("justAnotherID") as Button;
            ScriptManager.GetCurrent(Page).RegisterPostBackControl(button);
        }
    }
    
    0 讨论(0)
提交回复
热议问题