Downloading a file found in my solution folder

Total Post:149


 1331  View(s)
Rate this:

Guys I am making an application that plays a media file from a folder of my solution. I have to allow the user to download the very file that is playing. Any help?

I am on VS2010 (c#)

  1. Re: Downloading a file found in my solution folder

    Take a look at this short sample code:

    Response.ContentType = "application/pdf";
    Response.AppendHeader("Content-Disposition", "attachment; filename=MyFile.pdf");

    You can get to the file in your solution with the Server.MapPath method.

      Modified On Mar-31-2018 04:50:40 AM


Please check, If you want to make this post sponsored

You are not a Sponsored Member. Click Here to Subscribe the Membership.