Click here to Skip to main content
15,891,902 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i need to display success message on page after exporting data into .CSV Format, for that the page neeed to be refreshed, but it was not refreshing, after response.end() page is not refreshing, can some one help me in this,,


thanks in advance
Posted
Comments
Gihan Liyanage 2-Sep-14 1:27am    
According to my knowledge you can not refresh page after Response.End
syed shanu 2-Sep-14 1:51am    
Chk this link hope this might help you.

http://www.codeproject.com/Questions/606054/howplustopluscallplusplusResponse-Redirectplusafte

http://www.nullskull.com/a/1326/refresh-web-pages-after-download-completed.aspx

http://stackoverflow.com/questions/10912164/what-is-the-best-way-to-download-file-from-server/10912955#10912955

http://forums.asp.net/t/1612221.aspx?Download+a+file+then+either+redirect+or+refresh+the+page+after+response+end+

According to my knowledge you can not refresh page after Response.End,

after export Cant you call

C#
Response.redirect("your page");
 
Share this answer
 
v2
Comments
ClimerChinna 2-Sep-14 1:36am    
in that case, when i display the success message on label it wont be displayed when i use response.redirect
y u need to refresh the page to pop a message
cant you do a java script popup from server side like this:
this.ClientScript.RegisterStartupScript(typeof(Page), "Popup", "alert('export successful');", true);


Do response.redirect("xyz.aspx?success=true");
on page load just check the query parameter for true and display your label.
 
Share this answer
 
v2
Comments
ClimerChinna 2-Sep-14 1:38am    
no i must display it on a label only,iam not allowed to display using javascript
saxenaabhi6 2-Sep-14 1:59am    
Do response.redirect("xyz.aspx?success=true");
on page load just check the query parameter for true and display your label.

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