Click here to Skip to main content
15,888,579 members

Comments by bhavesh002 (Top 39 by date)

bhavesh002 20-Nov-13 5:35am View    
this work when i was trying in sample application on my local pc but when i was put the same on server app it not give any popup and also not save file and one more thing it not give any error msg or exception code debug successfully
bhavesh002 20-Nov-13 5:32am View    
byte[] bytes = System.IO.File.ReadAllBytes("C:\\csharp_Excel.xls");


Response.AddHeader("Cache-Control", "no-cache, must-revalidate, post-check=0, pre-check=0");
Response.AddHeader("Pragma", "no-cache");
Response.AddHeader("Content-Description", "File Download");
Response.AddHeader("Content-Type", "application/force-download");
Response.AddHeader("Content-Transfer-Encoding", "binary\n");
Response.AddHeader("content-disposition", "attachment;filename=" + "C:\\csharp_Excel.xls");
Response.BinaryWrite(bytes);
HttpContext.Current.ApplicationInstance.CompleteRequest();
bhavesh002 20-Nov-13 5:24am View    
i was tried your sample code i was retrieves the file data from my file but this work on my app but when same code i run on server it was not work.
bhavesh002 20-Nov-13 5:21am View    
Yes
bhavesh002 28-Oct-13 4:19am View    
i was looked your suggested link but it is payed any other library which is free