Click here to Skip to main content
15,896,201 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all,
I am downloading a file from web server using "Response". What I want is I have to enable a button after successful download which is not happening. Help me in doing this.

Below is the code.
string filepath = Serverpath + validfile;
System.IO.FileInfo file = new System.IO.FileInfo(filepath);
Response.AddHeader("Content-Disposition", "attachment; filename=" + file.Name);
Response.AddHeader("Content-Length", file.Length.ToString());
Response.ContentType = "application/octet-stream";
Response.WriteFile(file.FullName);
btnCreate.Enabled=true;/// this is not happening.

Thanks in advance.
Posted
Updated 12-Oct-14 23:44pm
v3
Comments
Mukesh Pr@sad 13-Oct-14 3:21am    
It should enable.
Have u checked it by keeping break-point?
If not once check it.

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