private void BindChallanData(Int64 RequisitionId) { try { gvChallan.DataSource = null; DataTable dtInfo = new DataTable(); dtInfo = objLtmsService.GetRequisitionChallanDtlById(Convert.ToInt64(RequisitionId)); if (dtInfo.Rows.Count > 0) { gvChallan.DataSource = dtInfo; } gvChallan.DataBind(); dtInfo.Dispose(); } catch (Exception Ex) { objValidateData.SaveSystemErrorLog(Ex, Request.UserHostAddress); var message = new JavaScriptSerializer().Serialize("Some Error has occurred while performing your activity. Please contact the System Administrator for further assistance."); var script = string.Format("alert({0});", message); ScriptManager.RegisterClientScriptBlock(this, GetType(), "", script, true); } }