Ampersand Causing Problems in URL

Discussion in 'ASP .Net Mobile' started by KittyHawk, Jan 22, 2004.

  1. KittyHawk

    KittyHawk Guest

    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, Jan 22, 2004
    #1
    1. Advertising

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

    "KittyHawk" <> wrote in message
    news:...
    > I've got an ASP.NET application using the MMIT 1.0. The app builds URL

    query strings dynamically. I've always used the &amp; 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?
     
    Ed Kaim [MSFT], Jan 23, 2004
    #2
    1. Advertising

  3. KittyHawk

    KittyHawk Guest

    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.
     
    KittyHawk, Jan 24, 2004
    #3
  4. 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" <> wrote in message
    news:...
    > 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], Jan 26, 2004
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. tfortney

    Ampersand in attribute

    tfortney, Apr 27, 2004, in forum: ASP .Net
    Replies:
    4
    Views:
    1,189
    tfortney
    Apr 28, 2004
  2. Prasanna Padmanabhan
    Replies:
    1
    Views:
    647
    Kevin Spencer
    Jul 8, 2004
  3. Rodusa

    Ampersand problem

    Rodusa, Feb 8, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    2,395
    Rodusa
    Feb 9, 2005
  4. =?Utf-8?B?a2x5bm4=?=

    ampersand in string

    =?Utf-8?B?a2x5bm4=?=, Jun 17, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    604
  5. Terry Burns

    + in URL causing problems

    Terry Burns, Feb 17, 2006, in forum: ASP .Net
    Replies:
    6
    Views:
    351
    blackstaronline.net
    Feb 17, 2006
Loading...

Share This Page