在显示的时候用一个函数格式化一下数据库中的文本的格式,比如下面的
Function HTMLFormat(sText)
if sText<>"" then
dim _text
_Text = sText
_Text = Replace(_Text, "&", "&")
_Text = Replace(_Text, "<", "<")
_Text = Replace(_Text, ">", ">")
_Text = Replace(_Text, " ", " ")
_Text = Replace(_Text, vbCrLf, "<br>")
HTMLFormat = _Text
else
HTMLFormat = sText
end if
End Function
Function HTMLFormat(sText)
if sText<>"" then
dim _text
_Text = sText
_Text = Replace(_Text, "&", "&")
_Text = Replace(_Text, "<", "<")
_Text = Replace(_Text, ">", ">")
_Text = Replace(_Text, " ", " ")
_Text = Replace(_Text, vbCrLf, "<br>")
HTMLFormat = _Text
else
HTMLFormat = sText
end if
End Function
解决方案 »
- 请问如何控制软件使用期限的问题
- silverlight 中关于设计的问题
- 未实现根据鼠标的位置弹出一个层时,在网页的任何位置处单击鼠标隐藏弹出层,该如何解决啊
- 悬赏:在清梦公交查询系统里增加增加功能 上行 下行 加地图 奖 全部积分
- 资源共享50分全给
- ((char)DataBinder.Eval(Container, "DataItem.FLAG5"))=='Y'?true:false 为什么会出现指定的转换无效?请帮忙看看!
- 在某个页面需要暂时保存一个2维数祖 该用什么 怎么做
- 如何防止在服务器处理完成之前用户多次点击提交按钮
- 2005里connectionString 和 appSettings有何区别
- Jquery datatable插件怎么设置每列的对齐方式,默认是居左。
- 有60010条记录,每页20条记录,大家做来翻页要多少时间
- 如何设置数据库的超时时间?
请问:若用C#编写Replace()函数的参数需要改变吗?