HELP needed!!
-
i m saving path of file (eg D:\abc.pdf)in database.and when i access this path by retrieving it from database and display as hyperlink.. by clicking it doesnt open that file(abc.pdf).but if i store path as (http://localhost/abc.pdf)then it works.anyone plz tell how can i open file stored on C or D...otherthan(localhost)in asp.net
-
i m saving path of file (eg D:\abc.pdf)in database.and when i access this path by retrieving it from database and display as hyperlink.. by clicking it doesnt open that file(abc.pdf).but if i store path as (http://localhost/abc.pdf)then it works.anyone plz tell how can i open file stored on C or D...otherthan(localhost)in asp.net
If the file is stored outside of the web folders, noone but yourself will be able to browse to the file. If you want to give access to the file on the web, you either has to place it inside the web folders (or in a virtual folder), or make a proxy page that reads the file and sends it to the user. Also, using an absolute path like "d:\abc.pdf" will only allow yourself to access the file, even if the path is inside the web folders. --- b { font-weight: normal; }
-
i m saving path of file (eg D:\abc.pdf)in database.and when i access this path by retrieving it from database and display as hyperlink.. by clicking it doesnt open that file(abc.pdf).but if i store path as (http://localhost/abc.pdf)then it works.anyone plz tell how can i open file stored on C or D...otherthan(localhost)in asp.net
Hi, I think ur using Server.MapPath() don't use that one. U can use directly those paths. if u use MapPath(), i will goes to ur application path. Bye Pessi.