Quantcast
Viewing all articles
Browse latest Browse all 10469

Issue while Exporting Grid data to Excel (ASP) in IE

Hi,
   I am trying to export Grid data to excel in Asp. When we try to download any files or samples from browser for number of times, it will download it as sample(1),sample(2)... It will automatically numbers the files when it is already downloaded. I want to achieve the same scenario during my excel export.    Following is the code snippet used :         
    Response.Clear();
             Response.AddHeader("content-disposition", "attachment; filename=" + fileName);
             Response.ContentType = "application/ms-excel";             
             System.IO.StringWriter stringWrite = new System.IO.StringWriter();
             System.Web.UI.HtmlTextWriter htmlWrite = new HtmlTextWriter(stringWrite);
             string table = txtValue.Text;          
             Response.Write(table);

  When I run the Application in Chrome or fireFox it downloads like what I mentioned above. But if I run the App in IE 10. This is not downloading like Google or FireFox. Will I open the first Download , and then I try to open the Second Download it pops"The document with the same name already open , ...."
I am not able to figure it out why this arrives in IE ,Please help me to solve this.

Thanks,
Parameswari  

Viewing all articles
Browse latest Browse all 10469

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>