asp.net vb 問題 點樣將textbox(multiline)中的”enter” cut 曬

2008-07-08 6:57 am
請問點樣將textbox(mutiline)中的"enter" cut 曬?


例如在textbox中輸入:
example1
example2
example3


值的結果為:
example1example2example3

回答 (1)

2008-07-08 7:53 am
✔ 最佳答案
Use String.Replace() method

In page load event

If Page.IsPostBack Then
Dim s As String = TextBox1.Text
s = s.Replace(vbCrLf, "") ' replace carriage return line feed with an empty string
End If


收錄日期: 2021-04-26 13:12:07
原文連結 [永久失效]:
https://hk.answers.yahoo.com/question/index?qid=20080707000051KK03264

檢視 Wayback Machine 備份