Click here to Skip to main content
15,906,329 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi,
how can i create temporary link download with resume in asp.net with expire link after for example 2 days
i use this:
C#
Response.ContentType = "application/octet-stream";
               Response.AppendHeader("Content-Disposition", "attachment;filename=" + "12.exe");
           Response.TransmitFile(Server.MapPath("~/test/12.exe"));

but it's don't have resume and temp link

tnx
Posted

According to me, you can do steps as following:

1. Create a table with columns:
- url: save your temp link
- startdate: it is the effect date
- expire: it is the expiration date
2. In your code behind, then you should check if the current date greater than expire date, then the temp link is invalid.

Hope that help you!
 
Share this answer
 
Comments
jiji2663 4-May-13 13:22pm    
thanks for your help chein,
how implement step 2??
ChienVH 4-May-13 13:41pm    
In Page_Load event of the page, firstly you need to get the expire date from your db. Once you got it, then comparing the current date with it.
If the current date is greater than expire date, then hide that link or replace current link by a new link.
thanks for your help
that was useful for me
 
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