Solved

aspx need help to link a doc or excel

Posted on 2012-03-20
3
319 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 39

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

Highfive Gives IT Their Time Back

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

Suggested Solutions

User Beware!  This is a rather permanent solution to removing your email from an exchange server.  The only way to truly go back is to have your exchange administrator restore your mailbox from backups.  This is usually the option of last resort.  A…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
The viewer will learn how to simulate a series of sales calls dependent on a single skill level and learn how to simulate a series of sales calls dependent on two skill levels. Simulating Independent Sales Calls: Enter .75 into cell C2 – “skill leve…
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …

758 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

19 Experts available now in Live!

Get 1:1 Help Now