Display a block of text, Label or Literal or Textbox or TextArea, Line problem?

H

Henry

Hi everybody,
I just need to display a database text field onto a web page. But it
seems to me that none of the asp.net or html controls is suitable for
my task.
Let's say, the text need to be displayed is like following:

Line 1
Line 2

For asp.net Literal web control, it doe not display return line or
line feed proerply. Instead, it will display Line 1 Line 2 in same
line.
I understand that in Html, we need to use <br> to start a new line.
But that means I have to translate my text to include <br> tag, which
doesn't seem to be a good choice for me.
For Label control, it has the same problem as literal control--no
line break.
For textbox or textarea control, they seem to recognize line breaks,
however, both controls need to have a certain height.
But my web page needs to display text like free flow text, instead of
limiting them inside a textbox window.
Could you tell me any better solution?

Thank you.

Henry
 

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

Staff online

Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,045
Latest member
DRCM

Latest Threads

Top