protected void btnUpdateGridRecord_Click(object sender, EventArgs e) { string id = string.Format("Id: {0} Uri: {1}", Guid.NewGuid(), HttpContext.Current.Request.Url); using (Utils utility = new Utils()) { utility.MethodStart(id, System.Reflection.MethodBase.GetCurrentMethod()); } try { foreach (GridViewRow objItem in grvBulkPaymentTransaction.Rows) { if (objItem.Enabled != false) { _bill_Sys_BillingCompanyDetails_BO = new Bill_Sys_BillingCompanyDetails_BO(); if (((DropDownList)objItem.Cells[6].Controls[1]).SelectedValue != "3") { _bill_Sys_BillingCompanyDetails_BO.UpdatePaymentList(((Label)objItem.Cells[0].Controls[1]).Text, ((Label)objItem.Cells[1].Controls[1]).Text, ((TextBox)objItem.Cells[3].Controls[1]).Text, Convert.ToDateTime(((TextBox)objItem.Cells[4].Controls[1]).Text), Convert.ToDecimal(((TextBox)objItem.Cells[5].Controls[1]).Text), Convert.ToInt32(((DropDownList)objItem.Cells[6].Controls[1]).SelectedValue), ((TextBox)objItem.Cells[7].Controls[1]).Text, ((Bill_Sys_BillingCompanyObject)Session["BILLING_COMPANY_OBJECT"]).SZ_COMPANY_ID); } } } _arraylist = new ArrayList(); _arraylist = (ArrayList)Session["BulkData"]; GetData(); lblMsg.Visible = true; lblMsg.Text = "Payment Saved Successfully ...!"; //Page.ClientScript.RegisterClientScriptBlock(typeof(GridView), "Msg", "alert('Payment successfully done!'); ", true); //Response.Redirect("Bill_Sys_BillSearch.aspx", false); } catch (Exception ex) { Elmah.ErrorSignal.FromCurrentContext().Raise(ex); using (Utils utility = new Utils()) { utility.MethodEnd(id, System.Reflection.MethodBase.GetCurrentMethod()); } string str2 = "Error Request=" + id + ".Please share with Technical support."; base.Response.Redirect("Bill_Sys_ErrorPage.aspx?ErrMsg=" + str2); } //Method End using (Utils utility = new Utils()) { utility.MethodEnd(id, System.Reflection.MethodBase.GetCurrentMethod()); } }