Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Convert string to standard HTML code?

Options
  • 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