Solved

Download a file using asp.net

Posted on 2014-11-18
1
213 Views
Last Modified: 2014-11-26
Hi there,
I'm using Visual Studio 2008. Im have a web form that creates a file to a sub directory:
Dim path As String = HttpContext.Current.Request.PhysicalApplicationPath.ToString() + "Files\" + source + "_" + Format(Gldate, "MMddyyyy") + ".txt"
once this file gets created i need to have a way for the user to download it. After i did a quick search online i found that a Generic Handler can be an option but haven't use it before and wont know how to call it =(
Can you point me to the right direction?
Thanks!
0
Comment
Question by:COHFL
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 34

Accepted Solution

by:
Paul MacDonald earned 500 total points
ID: 40450222
There are a couple ways you can do this.  
  1) Create a link to the new file and let the user click it to open/download the file.
  2) RESPONSE.REDIRECT to the file, forcing the browser to follow the link.
0

Featured Post

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question