Solved

Open a file outside the Web Folder

Posted on 2008-06-17
4
539 Views
Last Modified: 2012-08-13
I am creating a document management system that will save files to network drives in various folders.
These folder will not be inside the same folder structure as the web site that accesses them.

How do I access these files so that people can download them.
ie. window.open("Z:/files/test.pdf") or set this as a A tag.

I am starting to think that the only thing that I could do is copy a temp file to the Web Folders and use from there.

Any ideas?
I am using ASP.NET
0
Comment
Question by:lawso
  • 2
  • 2
4 Comments
 
LVL 51

Expert Comment

by:tedbilly
ID: 21809965
Are you going to trigger the download through a web page?
0
 

Author Comment

by:lawso
ID: 21810603
Yep.
At the moment I am trying to add an Attribute to an ImageButton that will open in another window.
0
 
LVL 51

Accepted Solution

by:
tedbilly earned 250 total points
ID: 21810634
Then you should look for samples on writing to the HttpResponse Stream.  CAPTCHA samples use that technique.  In fact, if you search this site I and others have answered questions about writing to that stream.

Basically what you do is open a stream to read from the file.  You then redirect that stream to the HttpResponse object as an OutputStream to the client's browser which will then show the [Save As] dialog box.
0
 

Author Comment

by:lawso
ID: 21821128
Great idea... sometimes it is good to add another head to an problem.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

This article discusses the ASP.NET AJAX ModalPopupExtender control. In this article we will show how to use the ModalPopupExtender control, how to display/show/call the ASP.NET AJAX ModalPopupExtender control from javascript, how to show/display/cal…
A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now