Converting simple text to HTML

Discussion in 'ASP .Net' started by Boris Zakharin, Jul 25, 2003.

  1. Is there a way to convert ASCII text entered into a textbox, for example,
    into HTML so that newlines will be turned into <BR> tags or similar among
    other things? The closest I've found is HttpUtility.HtmlEncode, but it
    doesn't do the job.
     
    Boris Zakharin, Jul 25, 2003
    #1
    1. Advertisements

  2. Thanks. I'm using C#, but I get the idea.

    "Steve C. Orr, MCSD" <> wrote in message
    news:%...
    > Dim s as string = MyTextBox.Text.Replace(vbcrlf, "<br>")
    >

    http://msdn.microsoft.com/library/d...f/html/frlrfSystemStringClassReplaceTopic.asp
    >
    > --
    > I hope this helps,
    > Steve C. Orr, MCSD
    > http://Steve.Orr.net
    >
    >
    > "Boris Zakharin" <> wrote in message
    > news:uj5q%...
    > > Is there a way to convert ASCII text entered into a textbox, for

    example,
    > > into HTML so that newlines will be turned into <BR> tags or similar

    among
    > > other things? The closest I've found is HttpUtility.HtmlEncode, but it
    > > doesn't do the job.
    > >
    > >

    >
    >
     
    Boris Zakharin, Jul 25, 2003
    #2
    1. Advertisements

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. chak
    Replies:
    0
    Views:
    422
  2. mathieu
    Replies:
    3
    Views:
    697
    mathieu
    Jan 6, 2007
  3. geoffbache
    Replies:
    5
    Views:
    1,181
    geoffbache
    Jun 13, 2008
  4. Replies:
    18
    Views:
    968
    Neredbojias
    Apr 18, 2009
  5. Alfredo Agosti
    Replies:
    3
    Views:
    560
    Aaron Bertrand - MVP
    Sep 19, 2003
  6. Mike Green

    converting vertical text to horizontal text

    Mike Green, Feb 1, 2005, in forum: Perl Misc
    Replies:
    9
    Views:
    728
    Arndt Jonasson
    Feb 2, 2005
  7. Replies:
    2
    Views:
    299
    Tad McClellan
    Mar 22, 2005
  8. Patrick Rutledge
    Replies:
    7
    Views:
    574
    Roedy Green
    Jan 31, 2013
Loading...