Troubles with cr/lf translation in .Net 2.0

W

=WereWolf=

I noticed that any WebControl, rendering its html code through
HtmlTextWriter, gets crlf characters in Text property translated to "<br>" or
nothing.

This is pretty good in normal circumstances.

But it's annoying since i'm trying to databind the text property of a
multiline TextBox control and i need to mantain crlf from the datasource. I
also tried with a textarea with runat=server.
Even with a custom control nothing changes: i tried to override the render
method, simply writing some text with CRLFs to the htmlTextWriter, but CRLFs
are ignored.

Any suggestion will be appreciated.
Thank you!
 
W

=WereWolf=

Ok... found the solution...

Everything was happening into another custom control which striped away any
CRLFs during html rendering.

So, it was not ASP.NET 2.0's fault.

Bye!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,137
Messages
2,570,795
Members
47,342
Latest member
eixataze

Latest Threads

Top