New lines in text box when copying attributes into it

Dawson

Newcomer
Joined
Dec 13, 2002
Messages
1
Hi there, im new to Visual Basic .NET and was wondering if some of you guys could help me.

what im trying to achieve is to enter details and then add them to a text box on seperate lines. For example :-

Video Title
Rating
Cost

And i would like to add them all to a multiple lined text box in the form of :-

Star Wars
15
£1.50

Jurassic Park
15
£4.60
etc and so on.

I know how to get the details into the other field, but mine appears in the format :-

Star Wars15£1.50Jurassic Park15£4.60

How do I add new lines between the items?

Thanks very much.
 
You add Environment.NewLine as a seperator:

Visual Basic:
Text1.Text = "Line 1" & Environment.NewLine & "Line 2"

C#:
text1.Text = "Line 1" + Environment.NewLine + "Line 2";
 
Back
Top