Click here to Skip to main content
15,891,253 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,
I want to redirect to my website homepage after start of downloading the file how to redirect please tell me..
I am using below code for download file and open the my website homepage , file is downloading but
after start of downloading file my website is not opening.
C#
Response.ContentType = "application/octet-stream";
Response.AppendHeader("Content-Disposition", "attachment; filename=Sholatours_HowToGetTheBestOutOfYourVacation_FreeEbook.pdf");

Response.TransmitFile(Server.MapPath("~/LandingPages/img/Sholatours_HowToGetTheBestOutOfYourVacation_FreeEbook.pdf"));
Response.End();
Posted
v2
Comments
Did you check my answer?

1 solution

Please follow my previous answer - how to call Response.Redirect after Response.TransmitFile[^].
 
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