public void BindGrid() { 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()); } DataSet dset; try { string hdnBills = hdnBillNumber.Value.ToString(); string[] sBillNumber = System.Text.RegularExpressions.Regex.Split(hdnBills, @"\,"); string billNo = ""; for (int i = 0; i < sBillNumber.Length; i++) { if (sBillNumber.Length > 0) { if (sBillNumber[i] != "") { if (billNo == "") { billNo = "'" + sBillNumber[i].ToString() + "'"; } else { billNo = billNo + "," + "'" + sBillNumber[i].ToString() + "'"; } } } } Bill_Sys_NF3_Template template = new Bill_Sys_NF3_Template(); dset = new DataSet(); dset = template.GetVerification_Answer(billNo, this.txtCompanyID.Text); grdVerificationSend.DataSource = dset.Tables[0]; grdVerificationSend.DataBind(); } catch (Exception ex) { lblErrorMessage.Visible = true; lblErrorMessage.Text = ex.Message.ToString(); 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()); } }