i have a label inside my page which displays data entered by the user.
The problem is if the user enters something like
"Hey Jim, thought about using the <a> tag"
i have a label inside my page which displays data entered by the user.
I have used Uri.EscapeDataString and Uri.UnescapeDataString to encode and decode the data so it can be safely stored in database.
The <a> will be intrepreted as HTML and will do weird things to the rest of the label.
How can I get it to display <a> just like a normal plain text, instead of as a HTML label.
Use Server.HtmlEncode() like so: