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

Discussion in 'ASP .Net Web Controls' started by Henry, Feb 10, 2004.

  1. Henry

    Henry Guest

    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
     
    Henry, Feb 10, 2004
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. apcsaba

    TextBox,Literal,And new Line

    apcsaba, Oct 4, 2006, in forum: .NET
    Replies:
    0
    Views:
    990
    apcsaba
    Oct 4, 2006
  2. morrell
    Replies:
    1
    Views:
    1,006
    roy axenov
    Oct 10, 2006
  3. Andreas Leitgeb
    Replies:
    0
    Views:
    472
    Andreas Leitgeb
    May 15, 2009
  4. Anonieko Ramos

    What's wrong with rpc-literal? Why use doc-literal?

    Anonieko Ramos, Sep 27, 2004, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    413
    Anonieko Ramos
    Sep 27, 2004
  5. Knut Krueger
    Replies:
    8
    Views:
    340
    Knut Krueger
    Aug 20, 2013
Loading...

Share This Page