How to decode this partially encoded string?

Discussion in 'ASP .Net' started by John Dalberg, Mar 8, 2007.

  1. John Dalberg

    John Dalberg Guest

    This is part of submitted form. Which .NET function can be used to convert
    the encoded characters?

    ....
    Address%2525051%252505Berguvsv%2525E4gen%252520%2525208%2503City%2525052%25
    2505Lule%2525E5%2503CompanyName%2525053%252505Berglunds


    John Dalberg
    John Dalberg, Mar 8, 2007
    #1
    1. Advertising

  2. John Dalberg

    Teemu Keiski Guest

    HttpUtility class in System.Web namespace
    http://msdn2.microsoft.com/en-us/library/system.web.httputility.aspx

    or just Server.UrlDecode in ASP.NET. benefit with HttpUtility is that you
    can specify the encoding directly (Via Server property certain assumptions
    are done) though Server.UrlDecode should be sufficient in most cases.

    --
    Teemu Keiski
    AspInsider, ASP.NET MVP
    http://blogs.aspadvice.com/joteke
    http://teemukeiski.net


    "John Dalberg" <> wrote in message
    news:20070308125035.623$...
    > This is part of submitted form. Which .NET function can be used to convert
    > the encoded characters?
    >
    > ...
    > Address%2525051%252505Berguvsv%2525E4gen%252520%2525208%2503City%2525052%25
    > 2505Lule%2525E5%2503CompanyName%2525053%252505Berglunds
    >
    >
    > John Dalberg
    Teemu Keiski, Mar 8, 2007
    #2
    1. Advertising

  3. John Dalberg

    John Dalberg Guest

    "Teemu Keiski" <> wrote:
    > HttpUtility class in System.Web namespace
    > http://msdn2.microsoft.com/en-us/library/system.web.httputility.aspx
    >
    > or just Server.UrlDecode in ASP.NET. benefit with HttpUtility is that you
    > can specify the encoding directly (Via Server property certain
    > assumptions are done) though Server.UrlDecode should be sufficient in
    > most cases.


    I tried Server.UrlDecode abd it didn't work. The string was the same. Does
    the string need to be in a certain format. Are there errors that occur if
    decoding was not successful?

    Tony
    John Dalberg, Mar 8, 2007
    #3
    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. Dotan Cohen
    Replies:
    0
    Views:
    103
    Dotan Cohen
    Jun 13, 2013
  2. Robert Kern
    Replies:
    0
    Views:
    107
    Robert Kern
    Jun 13, 2013
  3. Dotan Cohen
    Replies:
    0
    Views:
    95
    Dotan Cohen
    Jun 13, 2013
  4. Robert Kern
    Replies:
    0
    Views:
    108
    Robert Kern
    Jun 13, 2013
  5. Dotan Cohen
    Replies:
    0
    Views:
    111
    Dotan Cohen
    Jun 13, 2013
Loading...

Share This Page