我有以下字符串,我需要到数据库存储和检索的目的一行:清理字符串
{"id":8,"heading":"heading goes here","content":"<p>
content goes here</p>
"}
我使用下面的命令来得到这个到一个行:
Dim strContent As String = Request.Form("strContent").Replace(vbCr, "").Replace(vbLf, "")
这使上面的字符串到一个行,如下所示:
{"id":8,"heading":"heading goes here","content":"<p> content goes here</p>"}
然而,串有S内eems是一个“标签”字符
我该如何摆脱?
我想我需要这样做,除非有更好的方法。当我从数据库中提取字符串时,如果字符串包含我想要删除的任何位,它将生成无效的json对象。 – oshirowanen 2011-02-07 10:16:08