• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 334
  • Last Modified:

aspx need help to link a doc or excel

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
LBecerra
Asked:
LBecerra
2 Solutions
 
Kyle AbrahamsSenior .Net DeveloperCommented:
Try

Response.Redirect(Server.MapPath(@"C:\temp\test.doc"))
0
 
RickCommented:
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
 
LBecerraAuthor Commented:
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now