简易的字符替换,可以用于用户自我介绍输入框,简单新闻回复& etc.

类别:.NET开发 点击:0 评论:0 推荐:

sub enter_click(sender as object,e as eventargs)

                     Dim myString As String          

                     myString=Request("intro")                      '获取表单内容

                     myString=Replace(myString,chr(13),"<br>")      '替换回车符 

                     myString=Replace(myString,chr(32),"&nbsp;")    '替换空格符

                     myString=Replace(myString,chr(9),"&nbsp;&nbsp;&nbsp;&nbsp;")     '替换Tab缩进符为4个空格

                     Message.Text=myString

end sub

本文地址:http://com.8s8s.com/it/it40962.htm