navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

Microsoft MVP

 

& in a querystring

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP and Database >> & in a querystring
Page: [1]
 
dzirkelb1

 

Posts: 1300
Joined: 10/5/2004
From: Cedar Rapids, Iowa
Status: offline

 
& in a querystring - 9/12/2006 14:52:38   
I have a vendor name called P&B. this obviously isn't a good naming convention, but that was set up before I was here.

Anyways, when I create a link to send the P&B to a new address, the querystring gets all messed up cause it stops at the &. What is the %number used to replace the &? Like, %23 is a # sign I think, and %20 is a blank space I think (those might be reversed)
rdouglass

 

Posts: 9186
From: Biddeford, ME USA
Status: offline

 
RE: & in a querystring - 9/12/2006 14:58:41   
My favorite ascii conversion chart:

http://www.lookuptables.com/

_____________________________

Don't take you're eye off your final destination.

ASP Checkbox Function Tutorial.

(in reply to dzirkelb1)
dzirkelb1

 

Posts: 1300
Joined: 10/5/2004
From: Cedar Rapids, Iowa
Status: offline

 
RE: & in a querystring - 9/12/2006 15:05:58   
I'm not sure that is what I'm looking for. I want to pass it to a link and then use request.querystring to get the value. Currently, it goes like this:

www.somesite.com?Vendor=P&B

When I do a request.querystring("Vendor"), then it comes up as P instead of P&B. I need to replace the & with something. I don't think what you gave me is right as I know the # has a replacement for sure, and each replacement given uses teh # key.

(in reply to rdouglass)
rdouglass

 

Posts: 9186
From: Biddeford, ME USA
Status: offline

 
RE: & in a querystring - 9/12/2006 15:37:41   
quote:

What is the %number used to replace the &?


Well, that is what you asked for.:)

What I do with a problem character like that is I usually find some text string that wouldn't show up otherwise. I frequently use something like "QQQQ" or "ZZZZ" and just do replace on it going 'in' to the querystring as well as coming 'out'

<a href="myPage.asp?myValue=<%=replace(myValue,"&","QQQQ")%>">Click<a>

and

myValue = replace(Request.querystring("myValue"),"QQQQ","&")

Works for me in many situations since I can't stand dealing with all that ULEncode crap. :)

_____________________________

Don't take you're eye off your final destination.

ASP Checkbox Function Tutorial.

(in reply to dzirkelb1)
dzirkelb1

 

Posts: 1300
Joined: 10/5/2004
From: Cedar Rapids, Iowa
Status: offline

 
RE: & in a querystring - 9/12/2006 15:46:04   
I think I would rather use the ULEncode than the replace. do you know what it is for the & sign?

(in reply to rdouglass)
rdouglass

 

Posts: 9186
From: Biddeford, ME USA
Status: offline

 
RE: & in a querystring - 9/12/2006 15:51:13   
%26

_____________________________

Don't take you're eye off your final destination.

ASP Checkbox Function Tutorial.

(in reply to dzirkelb1)
dzirkelb1

 

Posts: 1300
Joined: 10/5/2004
From: Cedar Rapids, Iowa
Status: offline

 
RE: & in a querystring - 9/12/2006 15:53:24   
Awesome, thanks!

(in reply to rdouglass)
rdouglass

 

Posts: 9186
From: Biddeford, ME USA
Status: offline

 
RE: & in a querystring - 9/12/2006 15:55:22   
Here's a little quick-n-dirty Encode/Decode page:

http://www.albionresearch.com/misc/urlencode.php

_____________________________

Don't take you're eye off your final destination.

ASP Checkbox Function Tutorial.

(in reply to dzirkelb1)
dzirkelb1

 

Posts: 1300
Joined: 10/5/2004
From: Cedar Rapids, Iowa
Status: offline

 
RE: & in a querystring - 9/12/2006 15:57:39   
awesome, thanks a ton

(in reply to rdouglass)
Page:   [1]

All Forums >> Web Development >> ASP and Database >> & in a querystring
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts