Hey,
THe string is decoded, so it thinks <Test String> is an HTML element. If you view source, you will see it. If you want it rendered appropriately, do:
Response.Write(Server.HtmlEncode(str))
When you render the text as a link, it then should appear appropriately encoded. Did you try adding it as a querystring value and seeing it there? It should something like:
This+is+a+%3cTest+String%3e
But instead of +, you should get %20. However, in your app, if you write to a string, it will appear as you see it.
Brian
|