Response.Redirect issue

Discussion in 'ASP.NET / ASP.NET Core' started by beddmic, Aug 25, 2006.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. Hello, can anyone help me. I am trying to redirect my page to a server location. This works fine on my development PC but Im not sure if I have the server path on discountasp.net correct.

    response.redirect("E:\Web\GolfScorerC\htdocs\Documents\ActualDocuments\Test.doc")

    In my root directory there is a directory called Documents\Actualdocuments and within this is a file called Test.Doc.

    Have I got the front part correct? E:\Web\GolfScorerC\htdocs\

    Hopefully someone will be able to assist.
     
  2. I don't think that you can (or want to) redirect to a local path like that. Why don't you just try:

    Response.Redirect('/Documents/ActualDocuments/Test.doc')
     
  3. should you use Response.Redirect(Server<WBR>.MapPath("~/Test.doc"))
    just so that your path is not hard coded.

    kevinasp.com
     
  4. Thanks to all that helped. JerSchneid - your solution worked. Thanks again.
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page