.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Home >> Forum >> ASP.Net >> Post New QuestionBookmark and Share Subscribe to Forum

How to download?

Posted By: Veera     Posted Date: August 12, 2010    Points:2   Category :ASP.Net
Hi.. friends.. Using File Upload control am upload files into specific folder...

My doubt is

How to download the uploaded files from that folder?

Here My Coding...

Thanks in Advance

protected void btnSubmit_Click(object sender, EventArgs e)
if (fileUpEx.HasFile)

string sourceFileName = fileUpEx.PostedFile.FileName;
sourceFileName = Path.GetFileName(sourceFileName);
string destFileName = Server.MapPath("Uploaded_Files") + "\\" + sourceFileName;

lblStatus.Text = "File Saved to: " + destFileName;


Author: Nikhil Kumar             
Posted Date: August 12, 2010     Points: 5   

Just provide a simple link in your Web Page having the path of located file.

Be helpful and enjoy life because it comes only onces. Give all the happiness to yours and remember it doesn't comes by money ...
Author: Hiren Soni             
Posted Date: August 14, 2010     Points: 5   

you can use the following code

Response.TransmitFile( Server.MapPath("Uploaded_Files") + "\\" + sourceFileName);

Hiren soni
Author: Veera             
Posted Date: August 17, 2010     Points: 5   

Sorry for the delay..

Thanks Honors...

Post Reply

You must Sign In To post reply
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend