I set a value for a Multiline Textbox
like this.
textBox1.Text = "Line1\r\n\r\nLine2";
But, only one line space in output.
When I read the value of textbox, I read "Line1\r\nLine2"
;
Why does ASP.NET not support more then one lineline character?
Also the markup needs to include TextMode="MultiLine" (otherwise it shows text as one line)
textBox1.Text = "Line1\r\r\Line2";
Solved the problem.
I had the same problem. If I add one Environment.Newline I get one new line in the textbox. But if I add two Environment.Newline I get one new line. In my web app I use a whitespace modul that removes all unnecessary white spaces. If i disable this module I get two new lines in my textbox. Hope that helps.
Try this one
Working fine for me...
While dragging the TextBox it self Press F4 for Properties and under the Textmode set to Multiline, The representation of multiline to a text box is it can be sizable at 6 sides. And no need to include any newline characters for getting multiline. May be you set it multiline but you dint increased the size of the Textbox at design time.
When page IsPostback, the following code work correctly. But when page first loading, there is not multiple newline in the textarea. Bug