Click here to Skip to main content
15,893,588 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am working in asp.net 2.0 and want that when user clicks on Download button he/she is redirected to another page and on that page download dialog box opens for downloading file and if user clicks on save button than it starts downloading.

is this possibly?

plz tell me!
thank u
@Chetanv@
Posted
Updated 18-Jan-12 18:56pm
v2
Comments
Jephunneh Malazarte 19-Jan-12 0:57am    
is your download button a user control?
anushripatil 19-Jan-12 1:10am    
yes.
1)when user clicks Download button, Response.Redirect("Download.aspx").
2)In that page, on page load you can have a details like file name, etc & Save button
3)On click of save button you can have the savedialogbox (optional) or else give some default path like C://DownlOad & display the default location to user(but this is not so good as he/she may not have that drive )
[no name] 19-Jan-12 1:29am    
download button is user control.
after that the download window is open containg save open cancel button.
and when i click on either button it will redirect to another page

1 solution

Hi,

Use like this.

C#
protected void Button1_Click(object sender, System.EventArgs e)
{
   Server.Transfer("Page.aspx", true);

   // Code to download the file.
}
 
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