Mark Wilson I am the creator of TopXML. I am available for international and local (Australia) contracts. I am a Solution Architect/Business Analyst. I have worked in IT in several countries (NZ, Australia, South Africa, UK) building and training teams for government and very large non-governmental organizations. I am ex-Microsoft Consulting Services. I wrote the first book on Microsoft XML published in 2000 called XML Programming with VB and ASP. Most recently I have been building tools for the SEO industry. Ask me for a 37 point SEO health-checkup for your website.
First posted :
03/24/2008
Times viewed :
754
The Server.HTMLEncode Method
Introduction
The Server.HTMLEncode method can be used to encode a
specified string. That means that the characters in the
string are converted to their HTML-encoded equivalent.
However what is the usage of that? Well let us say your
string contains the complete <a> tag including the
link, title etc. How would you display the complete tag (as a
tag - not as a link) with Response.Write? You can’t do
it, because it will convert the string into a tag and
therefore it will only show the link and not the complete
tag. For that problem you can use the HTMLEncode method.