SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Addict
    Join Date
    Feb 2000
    Location
    Minnesota
    Posts
    317
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    why is this line of ASP causing a break in the URL address?

    While having my site reviewed , I was notified that a section of the site did not work in NS. The "Error, page could not be found" thing would come up.

    I then noticed that there was a two space blank break in the URL. As soon as I deleted the two spaces and hit enter, I was directed to the correct page.

    In IE, the URL displays as:
    https://www.keomed.com/shipping.asp?mscssid=6HR7KNH6L0SR2PA200A2TRB5EGPQ3GUC&comments2=&first=first1

    In NS, the URL displays as:
    https://www.keomed.com/shipping.asp?mscssid=6HR7KNH6L0SR2PA200A2TRB5EGPQ3GUC&comments2= &first=first1

    The break occurs right after &comments2=

    Here is the ASP code. How can I get rid of the blank spaces?

    Code:
    strSecureURL = strSecureURL & Request.ServerVariables("URL") & "?mscssid=" & Request.QueryString("mscssid") & "&comments2=" & Request.Form("comments2") & "&first=first1"

    Thanks
    Keomed.com Webmaster
    www.keomed.com

  2. #2
    Just Blow It bronze trophy
    DaveMaxwell's Avatar
    Join Date
    Nov 1999
    Location
    Mechanicsburg, PA
    Posts
    7,254
    Mentioned
    113 Post(s)
    Tagged
    1 Thread(s)
    It's probably because IE is ignoring that space in comments2. Try doing a trim(Request.Form("comments2")) and see if that helps...
    Dave Maxwell - Manage Your Site Team Leader
    My favorite YouTube Video! | Star Wars, Dr Suess Style

  3. #3
    SitePoint Addict
    Join Date
    Feb 2000
    Location
    Minnesota
    Posts
    317
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Dave, it worked!
    Thanks!
    Keomed.com Webmaster
    www.keomed.com

  4. #4
    Just Blow It bronze trophy
    DaveMaxwell's Avatar
    Join Date
    Nov 1999
    Location
    Mechanicsburg, PA
    Posts
    7,254
    Mentioned
    113 Post(s)
    Tagged
    1 Thread(s)
    Cool....
    Dave Maxwell - Manage Your Site Team Leader
    My favorite YouTube Video! | Star Wars, Dr Suess Style

  5. #5
    SitePoint Wizard wdmny's Avatar
    Join Date
    Jul 2000
    Location
    Here
    Posts
    1,010
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Also, using
    Code:
    strVarHere = Server.URLEncode(strVarHere)
    would be recommended when passing data like this in the querystring.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •