Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 336
  • 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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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.

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