Assuming you deal with relatively big text(s) and your text(s) come(s) from
db, xml, text file(s) or other storage. So, let's say an article that needs
to be displayed on aspx page and that has been published by someone from
your staff using custom web-based content management...
In case of new paragraph, it's simple:
string text = <Some Source>.Replace("\n","<br>");
In case of "color", "bold font", etc. Build your own parser. Sounds awfully
big but it's simple. Read about and Use System.Text.RegularExpressions
namespace; String class also has a bunch of methods that would help. Details
depends on what exactly needs to be done.
Regards,
Kikoz
"Patrick.O.Ige" <pa********@acn.waw.pl> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Interesting to know how people format their Data before displaying to the
browser?
For example you have a word in a sentence that need to be bold or a
different color or start in a new paragraph or need to be numbered
accordingly etc..
Whats the best way to seperate the formating from the text itself?
Any ideas