C# How to insert new line into multi-line textbox? '\n' doesn't work!

There are plenty of places that tell you how to do this in a Windows Textbox, but not in the .net textbox. 

Not only does '\n' not work, but neither does '\r\n', or Environment.NewLine
Lets say that I want to return a number of email addresses from a databases, and foreach record set the email address as a new line in the textbox.

Can anybody help?
MCAD
0
loxley 3/29/2004 8:02:02 PM
📁 asp.net.web-forms
📃 93655 articles.
⭐ 27 followers.

💬 2 Replies
👁️‍🗨️ 1881 Views
You may try this:


String mssage = "This is first one\n" ;
mssage+= "This is second one\n";
mssage+="This is third one";
TextBox1.Text = mssage;

This posting is provided "AS IS" with no warranties, and confers no rights.
1
jimmym 3/29/2004 10:20:45 PM
Well, this certainly wasn't the way that I expected to have to do it, but it worked!

Thank you very much!
MCAD
-1
loxley 5/18/2004 7:07:22 PM
Reply: