?
Solved

Download a file using asp.net

Posted on 2014-11-18
1
Medium Priority
?
220 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 2000 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

The Orion Papers

Are you interested in becoming an AWS Certified Solutions Architect?

Discover a new interactive way of training for the exam.

Question has a verified solution.

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

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
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…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

764 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