用TEXTBOX控制输入文字后.插入数据库中总是无法按照原来的排版方式输出.
在写入数据库时将所输入的文字转换一下.
Private Function FormatString(ByVal str As String) As String
str = str.Replace(" ", " ")
str = str.Replace("<", "<")
str = str.Replace(">", ">")
str = str.Replace(ControlChars.Lf.ToString(), "<br>")
Return str
End Function
读出数据之后放在textbox里面的方法
在写入数据库时将所输入的文字转换一下.
Private Function FormatString(ByVal str As String) As String
str = str.Replace(" ", " ")
str = str.Replace("<", "<")
str = str.Replace(">", ">")
str = str.Replace(ControlChars.Lf.ToString(), "<br>")
Return str
End Function
读出数据之后放在textbox里面的方法
Private Function FormatStringTB(ByVal str As String) As String
str = str.Replace(" ", " ")
str = str.Replace("<", "<")
str = str.Replace(">", ">")
str = str.Replace("<br>", ControlChars.Lf.ToString())
Return str
End Function
str = str.Replace(" ", " ")
str = str.Replace("<", "<")
str = str.Replace(">", ">")
str = str.Replace("<br>", ControlChars.Lf.ToString())
Return str
End Function