Send QueryString Through URL?

Results 1 to 3 of 3

Thread: Send QueryString Through URL?

  1. #1
    Corrina Woolever Guest

    Default Send QueryString Through URL?

    I am trying to pass two values through a URL. This is what I have so far...I am only passing one value through the URL:<BR><BR>customercomments.asp?LNameSend=&#060;% =objRS("ShipLName")%&#062;<BR><BR>This works great, however, I need to pass another value through.<BR><BR>When I attempt the below code, it actually passes "ShipLame", but then it passes "?ShipZipCode=the value" instead of just passing the value.<BR><BR><BR>customercomments.asp?LNameSend=& #060;%=objRS("ShipLName")%&#062;?ShipZipCode=&#060 ;%=objRS("ShipZip")%&#062;<BR><BR>Am I attempting this all wrong? Is it possible to send two values through a URL?<BR><BR>Thanks for any help.

  2. #2
    Join Date
    Dec 1969

    Default RE: Send QueryString Through URL?

    Here&#039;s your fix:<BR><BR>Only one (1) question amrk should exist in your URL. All querystring variables should be seperated by an ampersand (&), not by a question mark (?).<BR>try:<BR><BR>customercomments.asp?LNameSend =&#060;%=objRS("ShipLName")%&#062;&ShipZipCode=&#0 60;%=objRS("ShipZip")%&#062; <BR><BR>Also, you should always URL Encode your querystring values; else, the querystring could get truncated by spaces or unusual characters (e.g. spaces, apostrophies, etc.)<BR>eg.<BR><BR><BR>customercomments.asp?LName Send=&#060;%=Server.URLEncode(objRS("ShipLName"))% &#062;&ShipZipCode=&#060;%=Server.URLEncoe(objRS(" ShipZip"))%&#062; <BR><BR>good luck!

  3. #3
    Corrina Guest

    Default RE: Send QueryString Through URL?

    Thank you SO much!!! Works like a charm!! I absolutely love this site. Someone always has the answer for me!!!

Posting Permissions

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