How to assign UpdatePanel Trigger's control ID with button's from gridview

前端 未结 4 2043
轮回少年
轮回少年 2021-01-24 21:21

currently I have a UpdatePanel for jQuery Dialog use, which contains a GridView.

And that GridView contains a FileUpload control in footer and EmptyDataTemplate

4条回答
  •  無奈伤痛
    2021-01-24 21:49

    Try registering the post back control from code behind like this:

    protected void grdExpense_RowCreated(object sender, GridViewRowEventArgs e)
        {
            LinkButton btnAdd = (LinkButton)e.Row.Cells[0].FindControl("btnAdd");
            if (btnAdd != null)
            {
                ScriptManager1.RegisterAsyncPostBackControl(btnAdd);
            }
        }
    

提交回复
热议问题