开发者

ASP.NET text box lines disappear

开发者 https://www.devze.com 2022-12-10 08:37 出处:网络
when i try to dynamicly change the text of a textbox, if there is a line break, \\r\\n , all the text after the line break disappears including the line break sign.

when i try to dynamicly change the text of a textbox, if there is a line break, \r\n , all the text after the line break disappears including the line break sign. only single lines are updated correctly. the textbox is set to MultiLine TextMode.

w开发者_C百科hat could cause such behaviour ?


You have to use vbCrLf for new lines.

Example :

TextBox1.Text = "First Line " & vbCrLf & "Second Line"
0

精彩评论

暂无评论...
验证码 换一张
取 消