在ASP.NET中怎么实现多行文本框内的换行? 文本框为服务...

2025-01-05 15:00:00
推荐回答(2个)
回答1:


extBox.Text = "First Line\r\nSecond Line\r\nThird Line";
或者
aTextBox.Text = "First Line" +
Environment.NewLine + "Second Line" +
Environment.NewLine + "Third Line";
要将TextMode属性设为MultiLine

回答2:

\n