not evaluate html from sql?

Discussion in 'ASP General' started by bouy78@yahoo.com, Jul 19, 2006.

  1. Guest

    quick question..I have some html in an mssql db and i want to
    response.write it without the tags being evaluated....????
    , Jul 19, 2006
    #1
    1. Advertising

  2. Mike Brind Guest

    wrote:
    > quick question..I have some html in an mssql db and i want to
    > response.write it without the tags being evaluated....????


    output = Replace(output,"<","&lt;")
    output = Replace(output,">","&gt;")
    Response.Write output

    The second replace operation probably isn't strictly necessary.....

    --
    Mike Brind
    Mike Brind, Jul 19, 2006
    #2
    1. Advertising

  3. wrote:
    > quick question..I have some html in an mssql db and i want to
    > response.write it without the tags being evaluated....????

    response.write server.htmlencode(yourtext)
    --
    Microsoft MVP -- ASP/ASP.NET
    Please reply to the newsgroup. The email account listed in my From
    header is my spam trap, so I don't check it very often. You will get a
    quicker response by posting to the newsgroup.
    Bob Barrows [MVP], Jul 19, 2006
    #3
  4. Guest

    Bob Barrows [MVP] wrote:
    > wrote:
    > > quick question..I have some html in an mssql db and i want to
    > > response.write it without the tags being evaluated....????

    > response.write server.htmlencode(yourtext)
    > --
    > Microsoft MVP -- ASP/ASP.NET
    > Please reply to the newsgroup. The email account listed in my From
    > header is my spam trap, so I don't check it very often. You will get a
    > quicker response by posting to the newsgroup.


    sweet..thanks
    , Jul 19, 2006
    #4
    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. kushalsoftpro
    Replies:
    6
    Views:
    2,170
    John Harrison
    Nov 4, 2004
  2. Mark A. Odell

    NULL: Is it guaranteed to evaluate 'not true'

    Mark A. Odell, Sep 25, 2003, in forum: C Programming
    Replies:
    19
    Views:
    464
    Dan Pop
    Sep 30, 2003
  3. Jim Newton

    if does not evaluate

    Jim Newton, Jun 5, 2004, in forum: Python
    Replies:
    8
    Views:
    281
    Tor Iver Wilhelmsen
    Jun 8, 2004
  4. Robert Brewer

    RE: if does not evaluate

    Robert Brewer, Jun 5, 2004, in forum: Python
    Replies:
    33
    Views:
    907
    Jacek Generowicz
    Jun 17, 2004
  5. Guest
    Replies:
    7
    Views:
    514
    Guest
    Mar 16, 2007
Loading...

Share This Page