navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
FrontPage Alternative
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

 

querystrings and ampersands

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

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

All Forums >> Web Development >> General Web Development >> querystrings and ampersands
Page: [1]
 
yb2

 

Posts: 653
Joined: 1/30/2006
Status: offline

 
querystrings and ampersands - 4/5/2006 23:56:28   
Hi

I have a problem. I've http encoded a string ( "Best Practice & Evaluation of Practice" ) to be used as a querystring parameter, but it still breaks on the &

http://mysite.com/default.aspx?p=1&q=%22Best%20Practice%20&%20Evaluation%20of%20Practice%22&c=1

Parameter q should come out as "Best Practice & Evaluation of Practice" but I only get "Best Practice "!!!!!!!!

Does anyone know how to get around this??????

Any help is much appreciated.
Kitka

 

Posts: 2520
Joined: 1/31/2002
From: Australia
Status: offline

 
RE: querystrings and ampersands - 4/6/2006 0:32:37   
quote:

Does anyone know how to get around this??????


Have you tried changing the & to the HTML escape sequence code for an ampersand?

&|amp;

or &|#38;

(NB: Remove the pipe I had to add to stop the code from showing as simply "&" in this message)



_____________________________

Kitka
**It is impossible to make anything foolproof because fools are so ingenious.**


(in reply to yb2)
yb2

 

Posts: 653
Joined: 1/30/2006
Status: offline

 
RE: querystrings and ampersands - 4/6/2006 1:30:32   
Yes. You are obviously more observant than me because if I'd added a pipe then you'd have seen this

q=%22Best%20Practice%20&|amp;%20Evaluation%20of%20Practice%22&c=1

but I didn't cuz I didn't notice the removal of the amp;!

It's 6 in the morning here and I haven't slept. Not that I don't make mistakes like that normally, I'm just having a self-pitying moan:)

(in reply to Kitka)
yb2

 

Posts: 653
Joined: 1/30/2006
Status: offline

 
RE: querystrings and ampersands - 4/6/2006 1:43:08   
I've fixed it. Instead of using HttpUtility.HtmlEncode I used HttpUtility.UrlEncodeUnicode instead and it worked.

You may ask why I didn't do that earlier but there are lots of methods and I don't know them all! (in my defence)

Now if only I could get my webhost to fixed the damned permissions on my website then perhaps I could test this in the wild!:)

Off to bed.:)

(in reply to yb2)
Page:   [1]

All Forums >> Web Development >> General Web Development >> querystrings and ampersands
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