File paths

  • Thread starter Thread starter Roger
  • Start date Start date
R

Roger

Hi all

I am writing an site were the user can create Pdfs of invoices orders etc.
I want to save them in a location that is not in the web server directory,
which i can do with no problem.

But i also want the user to beable to download and open the Pdf , how can i
do this ie


string saveTo = "c:/PDF/"+file name: works

link c:/PDF/+file name Grid view will not even display as a link !

maybey this is somthing that should not be done but there is a second reason
why i would like to do as when I re upload to the server it delets any PDfs
that have been created by the users since the last time the web site was
published.

Hope that makes some kind of sense

Thanks for any advice in advance

Roger
 
Hi Roger,

if you're linking to c:\pdf\***.pdf, then even if you turn it into a link,
the client's browser is going to be searching their local c: for \pdf\***.pdf

An easier way to do this is under IIS, and turning that pdf directory into a
virtual folder under your site. When you've done that you should be able to
access the contents of the folder by linking to

http://example.com/pdf/***.pdf

Regards,
Andrew
 
I second the virtual folder suggestion. This is exactly why virtual folders
were made.
Good luck.
 
Back
Top