hiding querystring in URL

Discussion in 'ASP General' started by Lord Merlin, Apr 11, 2004.

  1. Lord Merlin

    Lord Merlin Guest

    if I have a page which insert info into a DB, and then redirects the user to
    another page, with the following code:

    Response.Redirect("index.asp?p=confirm&Action=" & Request("Action") &
    "&FName=" & Server.URLEncode(Request("FName")) & "&Email=" &
    Request("Email") & "&newcode=" & Server.URLEncode(newcode) & "")

    how can I hide the stuff after the URL? This is what I get:

    http://hobbit/newhp/index.asp?p=confirm&Action=New&FName=Rudi&Email=theesain
    &newcode=M7EW1RZO

    This is not a form, so it's not todo with the GET / POST actions.

    --

    Kind Regards
    Rudi Ahlers
    +27 (82) 926 1689

    Greater love has no one than this, that he lay down his life for his friends
    (John 15:13).
     
    Lord Merlin, Apr 11, 2004
    #1
    1. Advertisements

  2. Lord Merlin

    Jonas S. Guest

    You could imitate a form and then submit it (for example using JavaScript)
     
    Jonas S., Apr 11, 2004
    #2
    1. Advertisements

  3. Lord Merlin

    Lord Merlin Guest

    : Lord Merlin wrote:
    : > if I have a page which insert info into a DB, and then redirects the
    : > user to another page, with the following code:
    : >
    : > Response.Redirect("index.asp?p=confirm&Action=" & Request("Action") &
    : > "&FName=" & Server.URLEncode(Request("FName")) & "&Email=" &
    : > Request("Email") & "&newcode=" & Server.URLEncode(newcode) & "")
    : >
    : > how can I hide the stuff after the URL? This is what I get:
    : >
    : >
    :
    http://hobbit/newhp/index.asp?p=confirm&Action=New&FName=Rudi&Email=theesain
    : > &newcode=M7EW1RZO
    : >
    : > This is not a form, so it's not todo with the GET / POST actions.
    :
    : Well, that *is* a get request, but anyhoo:
    :
    : 1. Hiding querystrings from the browser address bar is usually done with
    : a frameset that fills the viewport. Don't go this route, users can't
    : bookmark your pages and if search engines do find your content then
    : incoming links go deep into the site without the frameset anyway so it's
    : useless at best.
    : 2. Pass the primary key id on the querystring instead.
    : 3. Use Server.Transfer
    : 4. Use Sessions (either native or custom-built)
    : 5. Re-write the page logic to not require the redirect
    : --
    : Andrew Urquhart
    : - FAQ: www.aspfaq.com
    : - Archive: www.tinyurl.com/38kzx
    : - Contact: www.andrewu.co.uk/contact/
    : - Employ me: Front/middle tier ASP developer with WAI & web standards
    :
    :
    Ok, fair point, but ......
    1) The site was originally in frames, and now I'm taking it out of frames
    2) I don't follow you on this one.
    3) sounds like a good option to try out
    4) sound like a good option to try out
    5) different options require different redirects, thus I can't have all the
    redirected pages' info in one file


    --

    Kind Regards
    Rudi Ahlers
    +27 (82) 926 1689

    Greater love has no one than this, that he lay down his life for his friends
    (John 15:13).
     
    Lord Merlin, Apr 11, 2004
    #3
  4. Aaron Bertrand [MVP], Apr 11, 2004
    #4
  5. Lord Merlin

    Bob Barrows Guest

    You forgot to finish a sentence in option 2 :)
    Bob
     
    Bob Barrows, Apr 11, 2004
    #5
  6. You forgot to finish a sentence in option 2 :)

    I caught that a couple minutes ago. Thanks!
     
    Aaron Bertrand [MVP], Apr 11, 2004
    #6
  7. Lord Merlin

    Lord Merlin Guest

    heh, it looks like I cause quite a stir on the NG :)

    --

    Kind Regards
    Rudi Ahlers
    +27 (82) 926 1689

    Greater love has no one than this, that he lay down his life for his friends
    (John 15:13).
    : > You forgot to finish a sentence in option 2 :)
    :
    : I caught that a couple minutes ago. Thanks!
    :
    :
     
    Lord Merlin, Apr 11, 2004
    #7
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.