Ampersand problem

Discussion in 'ASP .Net' started by Rodusa, Feb 8, 2005.

  1. Rodusa

    Rodusa Guest

    I am having problems to use Response.Redirect(URL) with this URL below.
    The problem happens only with 1319&

    string URL =

    I try to response.write(URL) and I get this as a result

    I obtained the querystring of this URL with
    Request.ServerVariables("QUERY_STRING") and I tried to encode it with
    Server.URLEncode, however I still get the same URL above. It is really
    weird because the other parameters seem to be ok.

    Please help

    Rodusa, Feb 8, 2005
    1. Advertisements

  2. The problem is that "&quot" is being interpreted as " .

    string URL =

    You may have to change your parameter's name from
    quoteuserid to userid, or any other name *but* quoteuserid.
    Juan T. Llibre, Feb 8, 2005
    1. Advertisements

  3. Steve C. Orr [MVP, MCSD], Feb 8, 2005
  4. Rodusa

    Rodusa Guest


    I did try encoding with Server.URLEncode. However, I can only encode
    the parameters individually because when I encode the whole QueryString
    via Request.ServerVariables["QUERY_STRING"] it messes up the (=)
    making the URL invalid. The easier way is what Juan suggested: to
    change the param name uidcustomquote to something else.

    I appreciate your suggestions

    Rodusa, Feb 9, 2005
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.