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

前端 未结 4 1961
轮回少年
轮回少年 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 22:08

    This works

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

提交回复
热议问题