数据在存为数据库之前,用JS的encodeURIComponent进行编码,现需要在后台代码中进行解码,实现decodeURIComponent的功能,

如下:

HttpUtility.UrlDecode(dr[j].ToString());

用C#实现去掉文字中的html标签,用正则表达式实现:

value = System.Text.RegularExpressions.Regex.Replace(value, @"<[^>]*>", "");

posted on 2014-10-17 16:42  小傻瓜  阅读(168)  评论(0编辑  收藏  举报