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. Advertising

  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. 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. chak
    Replies:
    0
    Views:
    366
  2. geoffbache
    Replies:
    5
    Views:
    894
    geoffbache
    Jun 13, 2008
  3. Alfredo Agosti
    Replies:
    3
    Views:
    339
    Aaron Bertrand - MVP
    Sep 19, 2003
  4. Mike Green

    converting vertical text to horizontal text

    Mike Green, Feb 1, 2005, in forum: Perl Misc
    Replies:
    9
    Views:
    374
    Arndt Jonasson
    Feb 2, 2005
  5. Replies:
    2
    Views:
    155
    Tad McClellan
    Mar 22, 2005
Loading...

Share This Page