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?
If you want to have an ampersand in the query string, you need to encode it
as "%26".
> 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?
KittyHawk - 24 Jan 2004 16:41 GMT
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.
Ed Kaim [MSFT] - 26 Jan 2004 01:38 GMT
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.
> 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.