Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

Convert string to standard HTML code?

  • 03-09-2009 12:28PM
    #1
    Closed Accounts Posts: 20


    Hi all

    I am currently building a payment system into my website, cash ticket to be precise. When I send them the details of a payment I have to send them an okURL and a notOKURL, these are used to redirect the user back to my page whether the payment be successful or not.

    In their documentation it states the following about these 2 url's:
    4.1.1. Encoding of (N)OK-URLs:
    URLs have to be passed URL-encoded. The encoding is done in two steps:
    • the parameter of the URL have to be converted to standard HTML code,
    e.g. the character (ä Ä ö Ö ü Ü ß) are replaced by (ä Ä
    ö Ö ü Ü ß)
    • all non-alphanumeric characters in the parameter of the (N)OK-URL
    have to be replaced by ‘%HH’ (HH is the hex code of the character).
    EXAMPLE:
    “Danke für die Bezahlung” looks like “Danke für die Bezahlung” in standard
    HTML and finally has to be passed on as
    “Danke%20f%26uuml%3br%20die%20Bezahlung”.

    Does anyone know how I do this in C#, is their a built in library/function for doing this?

    Any help much appreciated.
    Regards


Comments

Advertisement