I need to send XML/HTML in an HTML email so that it displays unrendered. I'm using ASP.NET. What is the approach I should take?
+1
A:
If I understand correctly, you want the HTML to be displayed as text and not interpreted. If so, then you can simply use the Server.HtmlEncode method to encode your string and then send that back to the browser.
...
text="<h1>Hello World</h1>";
textEncoded = Server.HtmlEncode(text);
...
<%=textEncoded%>
Ed Schembor
2009-12-31 19:38:47