Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Keep the format of MultiLine TextBox.Text

Reply
Thread Tools

Keep the format of MultiLine TextBox.Text

 
 
=?Utf-8?B?ZnJhbms=?=
Guest
Posts: n/a
 
      08-16-2006
please help!

How to keep the format of the content of a MultiLine TextBox. For example,
'new line'

I try the code:
------------------------------
TextBox.Text = "TERANET / MPAC - KEY TERMS OF USE \n" & _
"3.1 \n" & _
.......
------------------------------

The display in Browser is:
------------------------------
TERANET / MPAC - KEY TERMS OF USE \n3.1\n ...
------------------------------

Thanks a lot!

 
Reply With Quote
 
 
 
 
Marina Levit [MVP]
Guest
Posts: n/a
 
      08-16-2006
The browser ignores extra whitespace. If you try to put 3 spaces in a row,
it will only show you one.
Try using <br> for a newline.

"frank" <> wrote in message
news:600C0CD3-9239-47E4-8C95-...
> please help!
>
> How to keep the format of the content of a MultiLine TextBox. For example,
> 'new line'
>
> I try the code:
> ------------------------------
> TextBox.Text = "TERANET / MPAC - KEY TERMS OF USE \n" & _
> "3.1 \n" & _
> ......
> ------------------------------
>
> The display in Browser is:
> ------------------------------
> TERANET / MPAC - KEY TERMS OF USE \n3.1\n ...
> ------------------------------
>
> Thanks a lot!
>



 
Reply With Quote
 
 
 
 
Marina Levit [MVP]
Guest
Posts: n/a
 
      08-16-2006
Oh hold on, you are talking about a textbox here. Sorry, I thought you just
had text right in the HTML.

Try using System.Environment.Newline instead of '\n'.

"frank" <> wrote in message
news:600C0CD3-9239-47E4-8C95-...
> please help!
>
> How to keep the format of the content of a MultiLine TextBox. For example,
> 'new line'
>
> I try the code:
> ------------------------------
> TextBox.Text = "TERANET / MPAC - KEY TERMS OF USE \n" & _
> "3.1 \n" & _
> ......
> ------------------------------
>
> The display in Browser is:
> ------------------------------
> TERANET / MPAC - KEY TERMS OF USE \n3.1\n ...
> ------------------------------
>
> Thanks a lot!
>



 
Reply With Quote
 
=?Utf-8?B?ZnJhbms=?=
Guest
Posts: n/a
 
      08-16-2006
I really appreciate it! It works very well.

Frank

"Marina Levit [MVP]" wrote:

> Oh hold on, you are talking about a textbox here. Sorry, I thought you just
> had text right in the HTML.
>
> Try using System.Environment.Newline instead of '\n'.
>
> "frank" <> wrote in message
> news:600C0CD3-9239-47E4-8C95-...
> > please help!
> >
> > How to keep the format of the content of a MultiLine TextBox. For example,
> > 'new line'
> >
> > I try the code:
> > ------------------------------
> > TextBox.Text = "TERANET / MPAC - KEY TERMS OF USE \n" & _
> > "3.1 \n" & _
> > ......
> > ------------------------------
> >
> > The display in Browser is:
> > ------------------------------
> > TERANET / MPAC - KEY TERMS OF USE \n3.1\n ...
> > ------------------------------
> >
> > Thanks a lot!
> >

>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How keep python socket alive for ever by setting Keep alive flag. hisan Python 1 06-25-2012 05:30 PM
FastCSV fcsv and how to keep imported field format (or how toconvert it) Dot Baiki Ruby 6 01-23-2011 04:22 PM
multiline CSV records (comma-separated values format) Yakov Perl Misc 2 05-12-2007 10:39 PM
Keep the format of MultiLine TextBox.Text frank ASP .Net Web Controls 0 08-15-2006 03:30 PM
how to define a variable to hold a multiline text input in perl from html multiline textbox dale zhang Perl Misc 8 11-30-2004 06:53 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57