Trigger UpdatePanel From ImageButton in GridView

Posted On // Leave a Comment
protected void gvData_RowCreated(object sender, GridViewRowEventArgs e)
        {
            if (e.Row.RowType == DataControlRowType.DataRow)
            {
                ImageButton ibTrue = (ImageButton)e.Row.FindControl("imgButtonTrue");                
                if (ibTrue != null) ScriptManager.GetCurrent(this.Page).RegisterAsyncPostBackControl(ibTrue);

                ImageButton ibFalse = (ImageButton)e.Row.FindControl("imgButtonFalse");                
                if (ibFalse != null) ScriptManager.GetCurrent(this.Page).RegisterAsyncPostBackControl(ibFalse);
            }
        }
asdf

0 komentar: