Sunday, October 15, 2006

How to display HTML/XML tags code in webpage?

Method 1: Use the <xmp>tage to surround the HTML or XML code to be displayed as plain text. For example:

<xmp>system><display><name>Someone</name></display></system>

Method 2: Convert the <> to &lt;>.
To display a simple link as code: &lt;a href="http://www.simplelink.com&quot;>Here</a>
Would show as : <a href="http://www.simplelink.com">Here</a>

@ Simple Code Encoder SUPER great tool, i.e.
<system.web>
      <urlMappings enabled="true">
            <add url="~/About.aspx" mappedUrl="~/Site_Common/About.aspx"/>
            <add url="~/Legal.aspx" mappedUrl="~/Site_common/Legal.aspx"/>
      </urlMappings>
</system.web>


e Display Code In Entries