Click here to Skip to main content
15,887,746 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi Experts,

Am writing a file content using Response object in a aspx page, in the same page i have one gridview
i want to refresh this grid view after using response object

presently am using this code..but its not working properly
can any one please help me to solve this??

C#
Bind_grid();
                      Response.ContentType = ContentType;
                      Response.AppendHeader("Content-Disposition", "attachment; filename=" + filePath);
                      byte[] byteArray = File.ReadAllBytes(filePath);
                      Response.BinaryWrite(byteArray);
                      Response.End();


thanking you
(Keerthi Kumar)
Posted
Comments
Sinisa Hajnal 5-Sep-14 5:45am    
Did you try moving BindGrid behind Response.End() ?
Keerthi Kumar(Andar) 5-Sep-14 5:47am    
ya...thats not working
[no name] 5-Sep-14 6:02am    
what do u want ? what's not happening? It's not your complete code

1 solution

 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900