DetailsView Control and others

  • Thread starter Marko Loukkaanhuhta
  • Start date

M

Marko Loukkaanhuhta

Hi,
this might be newbies question, but hey I'm newbie..

I'm trying to make a web site which you can use to read and update data from
sql server. Data on the sql server is text. Data fields in sql server are
ntext type.

Ok, I've managed to read data and update data to the sql server from my
website, however even if my text contains (at least in the sql server and in
edit box) carriage returns, like paragraphs made by return key, like you do
when you type using notepad.exe.

My problem is that text displayed by DetailsView control are all in the same
line, or at least return = space, so the the text looses it's paragraphs. Do
I need to use some other control or can I use some parameters to display
data so that it retains it's formatting?

TIA,
Marko
 
Ad

Advertisements

B

Brock Allen

If you look at the rendered HTML you should see your \n\r in there. The problem
is that the browser doesn't treat those as newlines. You need to replace
\r\n with something HTML-ish like a <br/>.
 

Top