protected void lnkCsv_Click(object sender, EventArgs e) { if (lstSelectedColumn.Items.Count > 0) { btnClick(this, e); if (objExportData != null && objExportData.Rows.Count > 0) { clsCommon objCommon = new clsCommon(); string strDate = DateTime.Now.Day.ToString() + DateTime.Now.Month.ToString() + DateTime.Now.Year.ToString() + DateTime.Now.Hour.ToString() + DateTime.Now.Minute.ToString() + DateTime.Now.Second.ToString() + DateTime.Now.Millisecond.ToString(); if (objCommon.ExportToCsv(objExportData, lstSelectedColumn, strFileName + strDate)) { // DInfo.ShowMessage("Export to .Pdf File.", Enums.MessageType.Error); } objCommon = null; } } else { DInfoExport.ShowMessage("Select column for Export.", Enums.MessageType.Error); } }