Question

I have a Textbox with Multiline enabled. but i can get the line brakes when i press the enter button, any idea on how to get it to work?

Was it helpful?

Solution

If you debug what is posted by multiline textbox you can see the value is like that :

line 1.\r\nline 2.

so if you assign multiline textbox's text property like that you can set your text with breaks :

txtMulti.Text = "line 1.\r\nline 2.";
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top