Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
New line in textbox
Message
 
To
08/07/2005 09:42:45
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Miscellaneous
Thread ID:
01030410
Message ID:
01030414
Views:
14
This message has been marked as the solution to the initial question of the thread.
Hilmar,
You have to do the same thing as in VFP with chr(13)+chr(10). Try this:
txtResult.Text = "Line1\r\nLine 2"
You can also use the following mthod which is suposedly better:
txtResult.Text = "Line1"+System.Environment.NewLine+"Line 2"
Hope this helps.

Einar



>Yesterday, during my .NET course, I tried to put multiple lines in a multi-line TextBox, and couldn't figure out how to put a new line symbol.
>
>(a)
>
>
>TxtResult.Text = "Line 1\nLine2"
>
>
>only put a square in place of the "\n". Is this C feature no longer allowed, is it written differently, or did I simply use it in the wrong place?
>
>(b)
>
>What would be the correct equivalent for the VFP code chr(13) + chr(10)?
>
>(c)
>
>Where do I find these things in the help? The questions seem quite basic, but I don't know where to start searching.
>
>TIA,
>
>Hilmar.
Semper ubi sub ubi.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform