protected void btnEdit_Click(object sender, EventArgs e) { CheckBox rdbGVRow = new CheckBox(); rdbGVRow = GetGvRadioButton(); foreach (GridViewRow dr in gvCustomerFolioMerge.Rows) { int rowIndex = dr.RowIndex; DataKey dKey = gvCustomerFolioMerge.DataKeys[rowIndex]; int customerId = int.Parse(dKey.Values["CustomerId"].ToString()); int amcCode = int.Parse(dKey.Values["AMCCode"].ToString()); string fnumber = dKey.Values["Count"].ToString(); if (((CheckBox)dr.FindControl("rdbGVRow")).Checked == true) { AdvisorBranchBo adviserBranchBo = new AdvisorBranchBo(); string ffromfolio = ddlAdvisorBranchList.SelectedValue.ToString(); bool folioDs = adviserBranchBo.CustomerFolioMerged(ffromfolio, fnumber, customerId); Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "pageloadscript", "loadcontrol('AdvisorCustomerAccounts','none');", true); } } }