-1

I'm trying to set a link in my asp.net website such that the file downloads directly to a specific local disk on the client.

For Eg: E:\output\report.pdf

Can anyone help me with the coding ?

Xavi López
  • 27,550
  • 11
  • 97
  • 161

2 Answers2

3

I think there's a flaw in your concept - a website should never have knowledge of the contents of your hard drive.

Therefore, setting a specific download path is not only impossible (that I know of, at least), it is conceptually wrong.

0

Browsers are deliberately isolated from the local filesystem in order to prevent scripting attacks. You cannot get this information.

You can explore Request.Browser in asp.net then you know what information you have about client. some exmaples are here

    Request.Browser.BackgroundSounds
    Request.Browser.Browser
    Request.Browser.Version
    Request.Browser.Platform
Abdul Saboor
  • 4,079
  • 2
  • 33
  • 25