使用ajax返回的json参数中存在双引号(")

如果json参数中存在“"”,json会自动截取双引号后面的字符串,为了让双引号正常显示,在后台.cs文件拼接参数时使用

HttpContext.Current.Server.HtmlEncode(item.AttributeName)

对参数进行html加密,前台不用处理即可正常显示

posted @ 2012-09-18 09:47  鸿bi  阅读(913)  评论(0编辑  收藏  举报