Solved

aspx need help to link a doc or excel

Posted on 2012-03-20
3
325 Views
Last Modified: 2012-08-14
I am developing a web based app using visual studio 8 and aspx. One page has buttons that need to deliver MS Word docs and Excel spreadsheets to the user.

note: for now I am working offline and store the docs on my c drive in folder named temp
so path is "c:\temp\test.doc"

when I use   Response.Redirect("C:/temp/test.doc")

it does not do anything - it says IE cannot find the webpage


I don't care how the delivery of word or excel takes place - even if user is just propmted to save it on their pc
0
Comment
Question by:LBecerra
3 Comments
 
LVL 40

Assisted Solution

by:Kyle Abrahams
Kyle Abrahams earned 100 total points
ID: 37743098
Try

Response.Redirect(Server.MapPath(@"C:\temp\test.doc"))
0
 
LVL 13

Accepted Solution

by:
Rick earned 300 total points
ID: 37743178
Store the documents in a folder within your web application.

For example, if your application is in C:\Temp\WebApp1, create a folder called Docs (C:\Temp\WebApp1\Docs) to store your documents; then:

Response.Redirect("~/Docs/test.doc")
0
 

Author Closing Comment

by:LBecerra
ID: 37744176
Thank you both. The solution with folder in web will answer my next step of how to redirect when I get on a web server and worked. The other solution had difficulties with our network.
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

The new Microsoft OS looks great, is easier than ever to upgrade to, it is even free.  So what's the catch?  If you don't change the privacy settings, Microsoft will, in accordance with the (EULA) you clicked okay to without reading, collect all the…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
The viewer will learn how to simulate a series of coin tosses with the rand() function and learn how to make these “tosses” depend on a predetermined probability. Flipping Coins in Excel: Enter =RAND() into cell A2: Recalculate the random variable…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …

821 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