store text as html and vice versa

  • Thread starter Thread starter peter x
  • Start date Start date
P

peter x

Hi Guyz,

I am saving the content of a text box into a memo field field in my
database. Unfortunately, I need to output this field as html which means my
carriage returns are ignored by the browser. Using <pre> isn't appropriate
so I plan on encoding text as it goes into (and comes out of the database)
i.e replace carriage returns with <br>. Whats the most efficient way to do
this? Or can you think of a better way?

Thank :) Peter
 
Thanks for that. I've used the XmlWriter already so I should have guessed
that there would be one for html too .. doh! Will let you know how I get on.
:)


Jayson said:
check out the HtmlTextWriter object, it should contain more than enough
methods/properties/etc to satisfy what you are looking for.
 
Hi peter,

Except for the textbox (And I do not know more) all cariage return line
feeds have to be done with <br> there is no code translation for it.


Cor
 
Back
Top