---
title: "Downloading a file found in my solution folder"  
description: "Downloading a file found in my solution folder"  
author: "Royce Roy"  
published: 2013-10-05  
updated: 2013-10-05  
canonical: https://www.mindstick.com/forum/1586/downloading-a-file-found-in-my-solution-folder  
category: "asp.net"  
tags: ["asp.net"]  
reading_time: 1 minute  

---

# Downloading a file found in my solution folder

Guys I am making an [application](https://www.mindstick.com/articles/12824/calculator-application-in-android) that plays a [media](https://www.mindstick.com/articles/44257/the-impact-of-social-media-on-lawsuits) [file](https://www.mindstick.com/articles/59/encrypting-and-decrypting-files-using-c-sharp) from a folder of my solution. I have to allow the [user](https://www.mindstick.com/articles/13001/multi-statement-table-valued-user-defined-function-in-sql-server) to [download](https://www.mindstick.com/articles/188403/website-to-download-photos-from-instagram) the very file that is playing. Any help?

I am on VS2010 (c#)

## Replies

### Reply by Dag Hammarskjold

Take a look at this short sample code:

```
Response.ContentType = "application/pdf";
Response.AppendHeader("Content-Disposition", "attachment; filename=MyFile.pdf");
Response.TransmitFile(Server.MapPath("~/Files/MyFile.pdf"));
Response.End();
```

You can get to the file in your solution with the `Server.MapPath` method.


---

Original Source: https://www.mindstick.com/forum/1586/downloading-a-file-found-in-my-solution-folder

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
