protected void btnGo_OnClick(object sender, EventArgs e) { try { LogBl objLogBl = new LogBl(); DateTime dtFromDateTime = DateTime.ParseExact(txtFromDate.Text + " " + txtFromTime.Text, "dd/MM/yyyy HH:mm:ss", CultureInfo.InvariantCulture); DateTime dtToDateTime = DateTime.ParseExact(txtToDate.Text + " " + txtToTime.Text, "dd/MM/yyyy HH:mm:ss", CultureInfo.InvariantCulture); var objResult = objLogBl.TCIPLogReport(dtFromDateTime, dtToDateTime); gvTCIPLogReport.DataSource = objResult.ResultDt; gvTCIPLogReport.DataBind(); if (gvTCIPLogReport.Rows.Count > 0) { divExport.Visible = true; divNo.Visible = false; } else { divExport.Visible = false; divNo.Visible = true; } } catch (Exception ex) { log.Error("Error", ex); ClientScript.RegisterStartupScript(typeof(Page), "MessagePopUp", "<script>alert('Oops! There is some technical Problem. Contact to your Administrator.');</script>"); } }