Results 1 to 3 of 3

Thread: tags as text

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 1999
    Location
    ma,usa
    Posts
    485
    How do I display html and asp tags and code on an asp page as text(without executing)?
    I'm able to use char(num) to get the html tags as text but not the asp "<%%>" 's

  2. #2
    New Member
    Join Date
    Jan 2001
    Location
    Florida, USA
    Posts
    10
    For the HTML, you can use the <plaintext> tags:

    <plaintext>This is the text and/or html you want to display</plaintext>


    For the ASP, simply use the URLEncoded versions of the <% and %> to display the "<%","%>" tags:

    &lt;%<br>
    for i = 1 to 10<br>
    Response.Write "hello world"<br>
    next<br>
    %&gt;<br>

    Hope that helps...

    JeffB

  3. #3
    Junior Member
    Join Date
    Nov 2000
    Posts
    20

    Arrow Reply

    Hello,
    Use the HTMLEncode() method. It will work.

    Bye and have a good time programming.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width