How enter multi lines text in desgin time

Discussion in 'ASP .Net' started by ad, Aug 7, 2006.

  1. ad

    ad Guest

    I have set a TextBox to MultiLines and set the rows to 10.
    I assigned the Text of the TextBox some lins of text at desgin time,
    but only the first line remain in the TextBox.

    How can I assign some lines of text at desgin time?
    ad, Aug 7, 2006
    #1
    1. Advertising

  2. Hello ad,

    I'm not really sure what you're asking but I think you might be trying to
    add more than one line of text to the multiline textbox. You can do that
    using one of the following techniques:

    1) Add the lines to the text already in the box:
    TextBox1.Text = "The first bit of text. ";
    TextBox1.Text += "Another bit or text. ";
    TextBox1.Text += "Still more.";

    2) If you're adding alot of text often, you might want to use the
    StringBuilder class. Add the text to a StringBuilder object and then assign
    that text to the TextBox.Text property.

    If you're asking how to add new rows of text, then you'll want to look at
    the \n newline escape character.
    --
    enjoy - brians
    http://www.limbertech.com


    "ad" wrote:

    > I have set a TextBox to MultiLines and set the rows to 10.
    > I assigned the Text of the TextBox some lins of text at desgin time,
    > but only the first line remain in the TextBox.
    >
    > How can I assign some lines of text at desgin time?
    >
    >
    >
    >
    =?Utf-8?B?YnJpYW5zW01DU0Rd?=, Aug 8, 2006
    #2
    1. Advertising

  3. ad

    ad Guest

    Thanks,
    But I mean add mutli line to a TextBox at desgin time.
    For example, I have two lines below:
    This the fist line.
    This the sceond line.

    How can I add these to line to a TextBox at desgin time.


    "brians[MCSD]" <> ¼¶¼g©ó¶l¥ó·s»D:...
    > Hello ad,
    >
    > I'm not really sure what you're asking but I think you might be trying to
    > add more than one line of text to the multiline textbox. You can do that
    > using one of the following techniques:
    >
    > 1) Add the lines to the text already in the box:
    > TextBox1.Text = "The first bit of text. ";
    > TextBox1.Text += "Another bit or text. ";
    > TextBox1.Text += "Still more.";
    >
    > 2) If you're adding alot of text often, you might want to use the
    > StringBuilder class. Add the text to a StringBuilder object and then
    > assign
    > that text to the TextBox.Text property.
    >
    > If you're asking how to add new rows of text, then you'll want to look at
    > the \n newline escape character.
    > --
    > enjoy - brians
    > http://www.limbertech.com
    >
    >
    > "ad" wrote:
    >
    >> I have set a TextBox to MultiLines and set the rows to 10.
    >> I assigned the Text of the TextBox some lins of text at desgin time,
    >> but only the first line remain in the TextBox.
    >>
    >> How can I assign some lines of text at desgin time?
    >>
    >>
    >>
    >>
    ad, Aug 8, 2006
    #3
  4. ad

    Damien Guest

    ad wrote:
    > Thanks,
    > But I mean add mutli line to a TextBox at desgin time.
    > For example, I have two lines below:
    > This the fist line.
    > This the sceond line.
    >
    > How can I add these to line to a TextBox at desgin time.
    >

    Switch to HTML view. Inside the textarea element, put the exact text
    you want to appear (including newlines, tabs, etc)?

    Damien
    Damien, Aug 8, 2006
    #4
    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. Javier Martínez

    I can't see the theme of the page in desgin mode

    Javier Martínez, Jan 2, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    408
    Javier Martínez
    Jan 2, 2006
  2. Murali
    Replies:
    2
    Views:
    545
    Jerry Coffin
    Mar 9, 2006
  3. Husam

    Desgin Web Application

    Husam, Apr 8, 2008, in forum: ASP .Net
    Replies:
    1
    Views:
    307
    Jordan S.
    Apr 8, 2008
  4. mike
    Replies:
    3
    Views:
    92
  5. HopfZ
    Replies:
    0
    Views:
    544
    HopfZ
    Aug 28, 2006
Loading...

Share This Page