This piece of code generates a CSV file when run on Chrome v37. It uses LinqToCVS.

CsvContext cc = new CsvContext();
                    string outputFileName = string.Format("D:\\Dashboard.csv", DateTime.Now);
                    string attachment = "attachment; filename=D:\\Dashboard.csv";
                    cc.Write(filteredListOfPerformanceDashboardSummary, outputFileName);
                    HttpContext.Current.Response.Clear();
                    HttpContext.Current.Response.ClearHeaders();
                    HttpContext.Current.Response.ClearContent();
                    HttpContext.Current.Response.AddHeader("content-disposition", outputFileName);
                    HttpContext.Current.Response.ContentType = "text/csv";
                    HttpContext.Current.Response.AddHeader("Pragma", "public");
                    HttpContext.Current.Response.Write(cc.ToString());
                    HttpContext.Current.Response.End();

But in IE 9.0 it gives an error like this . Why could this be ?

Line: 885
Error: Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed.

Related posts

Recent Viewed