Passing Variables via URL...

Results 1 to 5 of 5

Thread: Passing Variables via URL...

  1. #1
    Join Date
    Dec 1969
    Posts
    3

    Default Passing Variables via URL...

    Hi all,<BR>I am using ASP to retrieve user profiles for a site. The URL is this:<BR>http://www.XXXXX.com/fans/viewprofile.asp?id=username<BR><BR>Now, the error:<BR>There is a problem for users with spaces in their username. <BR>When IE users hit the automatically generated link, a "%20" is automatically inserted where the space is and the link works fine, but when a Netscape user tries the link, it remains unchanged, like so:<BR>http://www.XXXXX.com/fans/viewprofile.asp?id=user name <BR>This produces an error that reads:<BR>HTTP Error 400<BR>400 Bad Request<BR>Due to malformed syntax, the request could not be understood by the server. The client should not repeat the request without modifications.<BR><BR>As opposed to a link like this:<BR>http://www.XXXXX.com/fans/viewprofile.asp?id=user%20name <BR>which works fine.<BR><BR>All references are for versions 4+ of both browsers.<BR>Does anyone have any experience/insight in this area? It would be much appreciated.<BR>Scooter Harmon<BR>

  2. #2
    Kranthi Dandamudi Guest

    Default RE: Passing Variables via URL...

    Use URLEncode before you pass the values.<BR><BR>It should be of the form<BR><BR>part1="&lastname="&server.URLencode(Re quest("lastname"))<BR><BR>I think this should help

  3. #3
    Join Date
    Dec 1969
    Posts
    60

    Default RE: Passing Variables via URL...

    Try using <BR>&#060;%<BR>server.URLPathEncode ("user name")<BR>%&#062;

  4. #4
    Join Date
    Dec 1969
    Posts
    3

    Default Thanks for the help, but.....

    A Perl script is generating the HTML page that the links are on. Hence, no ASP allowed there. Are there any other options?<BR><BR>Thanks again for the replies,<BR>Scooter


  5. #5
    Rob Guest

    Default RE: Thanks for the help, but.....

    Why don&#039t you try passing your var via a small form instead..

Posting Permissions

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