How to go to a new line in a TextBox.

esposito

Centurion
Joined
Jul 11, 2003
Messages
103
Location
Perugia - Italy
Hello, I'm new to ASP.NET. I would like to populate a textbox programmatically with some text containing different paragraphs.

Unfortunately, I don't know the code that allows you to go to a new line in ASP.NET.

I have tried to use the VB keywords Chr(13) & Chr(10) as in the following example but it didnt work.

<code>
TextBox1.Text = "This is the first paragraph." & Chr(13) & Chr(10) & "And this should be the second!"
</code>

Any help?

TIA
 
TextMode = MultiLine

Then you can do this....

TextBox1.Text = "This is the first paragraph." & ControlChars.NewLine & "And this should be the second!"
 
Back
Top