Ampersand Causing Problems in URL

K

KittyHawk

I've got an ASP.NET application using the MMIT 1.0. The app builds URL query strings dynamically. I've always used the & or & escape sequence in the past to specify an ampersand in the query string and it's worked just fine. Now, I've got users with newer WAP browsers who say that the URLs the app builds are invalid. The URL is actually displaying the escape sequence which, of course, is invalid. If I just use the ampersand it renders older WML browsers useless.

What is the best solution to this?
 
E

Ed Kaim [MSFT]

If you want to have an ampersand in the query string, you need to encode it
as "%26".

KittyHawk said:
I've got an ASP.NET application using the MMIT 1.0. The app builds URL
query strings dynamically. I've always used the & or & escape
sequence in the past to specify an ampersand in the query string and it's
worked just fine. Now, I've got users with newer WAP browsers who say that
the URLs the app builds are invalid. The URL is actually displaying the
escape sequence which, of course, is invalid. If I just use the ampersand it
renders older WML browsers useless.
 
K

KittyHawk

I'm not sure I understand. Isn't the ampersand required to separate parameters in a query string? Using the hex equivalent "%26" as my separator does not work.
 
E

Ed Kaim [MSFT]

I thought you were asking about using an ampersand as a field or a value, in
which case you'd need to encode. If the browser doesn't handle '&' in the
URL, then it's a bug because that's part of the standard.

KittyHawk said:
I'm not sure I understand. Isn't the ampersand required to separate
parameters in a query string? Using the hex equivalent "%26" as my separator
does not work.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,007
Latest member
obedient dusk

Latest Threads

Top