HTML Code embedded within HTML Page as Text

Discussion in 'ASP .Net' started by =?Utf-8?B?UGF1bA==?=, Nov 7, 2007.

  1. I know this is a somewhat rudimentary question but...

    I want to display HTML code on an HTML page but I want the code to display
    as text. In other words, I want the code not to be rendered as HTML on the
    HTML page, but rather have it rendered as simple text.

    This must be easy to do as I see it everywhere.

    TIA.
    =?Utf-8?B?UGF1bA==?=, Nov 7, 2007
    #1
    1. Advertising

  2. "Paul" <> wrote in message
    news:D...

    > I want to display HTML code on an HTML page but I want the code to display
    > as text. In other words, I want the code not to be rendered as HTML on the
    > HTML page, but rather have it rendered as simple text.
    >
    > This must be easy to do as I see it everywhere.


    <pre>

    </pre>


    --
    Mark Rae
    ASP.NET MVP
    http://www.markrae.net
    Mark Rae [MVP], Nov 7, 2007
    #2
    1. Advertising

  3. I initially tried this (before the post) and it did not work.

    For example the code below showed up as a hyperlink...

    <pre>
    <a href="help">asas</a>
    </pre>




    "Mark Rae [MVP]" wrote:

    > "Paul" <> wrote in message
    > news:D...
    >
    > > I want to display HTML code on an HTML page but I want the code to display
    > > as text. In other words, I want the code not to be rendered as HTML on the
    > > HTML page, but rather have it rendered as simple text.
    > >
    > > This must be easy to do as I see it everywhere.

    >
    > <pre>
    >
    > </pre>
    >
    >
    > --
    > Mark Rae
    > ASP.NET MVP
    > http://www.markrae.net
    >
    >
    =?Utf-8?B?UGF1bA==?=, Nov 7, 2007
    #3
  4. Mark Rae [MVP], Nov 7, 2007
    #4
  5. =?Utf-8?B?UGF1bA==?=

    IfThenElse Guest

    This does NOT work
    <PRE>
    <a href="www.blah.com"> Click here to got to blah.com</a>
    </PRE>

    However This Works
    <PRE>
    &lt;a href="www.blah.com"&gt; Click here to got to blah.com&lt;/a&gt;
    </PRE>


    "Mark Rae [MVP]" <> wrote in message
    news:...
    > "Paul" <> wrote in message
    > news:...
    >
    >>I initially tried this (before the post) and it did not work.

    >
    > Works for me...
    >
    > You can see an example of it here:
    > http://www.htmlcodetutorial.com/linepar/_PRE.html
    >
    >
    > --
    > Mark Rae
    > ASP.NET MVP
    > http://www.markrae.net
    IfThenElse, Nov 7, 2007
    #5
  6. "IfThenElse" <> wrote in message
    news:erYYK%...

    > "Mark Rae [MVP]" <> wrote in message
    > news:...
    >> "Paul" <> wrote in message
    >> news:...
    >>
    >>>I initially tried this (before the post) and it did not work.

    >>
    >> Works for me...
    >>
    >> You can see an example of it here:
    >> http://www.htmlcodetutorial.com/linepar/_PRE.html


    > This does NOT work
    > <PRE>
    > <a href="www.blah.com"> Click here to got to blah.com</a>
    > </PRE>
    >
    > However This Works
    > <PRE>
    > &lt;a href="www.blah.com"&gt; Click here to got to blah.com&lt;/a&gt;
    > </PRE>
    >


    Yes - I forgot to mention the encoding part - apologies, group...


    --
    Mark Rae
    ASP.NET MVP
    http://www.markrae.net
    Mark Rae [MVP], Nov 7, 2007
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Colin Paul Gloster
    Replies:
    48
    Views:
    1,853
    Colin Paul Gloster
    Apr 10, 2007
  2. Thomas Dodds

    Databind an embedded control in an embedded datagrid

    Thomas Dodds, Jul 26, 2004, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    386
    Thomas Dodds
    Jul 26, 2004
  3. Joe Stampf
    Replies:
    0
    Views:
    109
    Joe Stampf
    Dec 15, 2003
  4. Trans
    Replies:
    11
    Views:
    285
    micathom
    Sep 5, 2007
  5. Num GG
    Replies:
    2
    Views:
    343
    Num GG
    Nov 17, 2008
Loading...

Share This Page