I have a string with special characters like this:
äöüß&
Now I want to put that in an HTML document and need to escape these characters. Is there an elegant way doing this?
I could do this:
string html;
html = html.Replace("ü", "uu¨");
html = html.Replace("ß", "ß");
....
But I don't want to do that for all possible special characters.