Redirect Help with URL

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • morey
    New Member
    • Jun 2006
    • 2

    Redirect Help with URL

    I am having an issue with redirection to a document.

    Here is the scenario;

    The user fills out some form information and upon submission is taken to a specific page in a pdf file. Everything to this point is working fine, the problem I keep facing is that the browser is changing the URL when it gets sent from the ASP script.

    I.E. the url is something like this : library/sop/sop.pdf#page=23 4

    When it gets sent to the browser the equal sign is being replaced by it's hex equivalent (%3D).

    So I end up getting this: library/sop/sop.pdf#page%3D 234. The file will still open but it will not go to the correct page.

    Can anyone shed some light on this? I have tried several different things but none have seemed to work in keeping the browser from changing the =.

    Thanks,
    Morey
  • sashi
    Recognized Expert Top Contributor
    • Jun 2006
    • 1749

    #2
    Hi Morey,

    emm.. lets assume that the "page" keyword is your querystring.. rite..

    so on your asp. script do the following..
    <a href=../somewhere/somefile.asp?pa ge=<%=Server.UR LEncode("someth ing_where")%>So mething</a>

    Comment

    • morey
      New Member
      • Jun 2006
      • 2

      #3
      Sahsi, thanks for the reply.

      First, I forgot to mention that I am very new to ASP and am learning as I putter along. Also, I am calling the page from a Response.Redire ct. If it helps the page number is set to a variable because it will be changing from time to time.

      I have been able to get the desired result from just creating a Response.Write link, but I really just want to page to be called up automatically.

      Here are a couple of version I have tried that worked, but again the equal sign kept getting changed.

      DIM Page
      Page = "="+Request.For m("Page")

      Response.Redire ct "../library/sop.pdf#page"+ Server.URLEncod e(Page)


      DIM URL
      URL = "../library/sop.pdf#page=" + Page
      Response.Redire ct URL


      -Morey-
      Last edited by morey; Jun 20 '06, 05:34 PM.

      Comment

      Working...