I am exporting one excel to gridview for displaying no of records, everything is working fine, but one issue is that.
After on save button click, I m able to gridview but when I click on Record saved successfully message the records in the gridview disappears, I dont know why.
Here is my code:-
protected void btnSave_Click(object sender, EventArgs e)
{
DataTable dtExcel = new DataTable();
dtExcel.Clear();
string StrCount = String.Empty;
string connString = "";
HttpPostedFile File = FileUpload1.PostedFile;
string strFileType = Path.GetExtension(FileUpload1.FileName).ToLower();
string path = FileUpload1.PostedFile.FileName;
string Filename = path.Substring(path.LastIndexOf("\\") + 1, path.Length - path.LastIndexOf("\\") - 1);
path = Server.MapPath(@"~/Excels/" + "/" + Filename.ToStrin ...
Go to the complete details ...