Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
New line in textbox
Message
 
À
08/07/2005 09:42:45
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Divers
Thread ID:
01030410
Message ID:
01030414
Vues:
13
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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform