文本框中的文本始终位于同一行。 [英] the text in the textbox is always on the same line.
本文介绍了文本框中的文本始终位于同一行。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在我的asp.net项目中,我使用以下任一表达式
In my asp.net project, I use either one of the expressions below
textbox1.Text = "First " + System.Environment.NewLine + " Second";
textbox1.Text = "First \r\n Second";
textbox1中的文本始终相同线。为什么?谢谢。
the text in the textbox1 is always on the same line. Why? Thanks.
推荐答案
将TextMode属性设置为Multiline,如下所示:
Set the TextMode property to Multiline as follows:
textbox1.TextMode = TextBoxMode.MultiLine
您是否将TextBox.TextMode
属性设置为Mutiline
?请参阅 TextBox.TextMode Property [ ^ ]。
Did you set theTextBox.TextMode
property toMutiline
? See TextBox.TextMode Property[^].
这篇关于文本框中的文本始终位于同一行。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文