日期:2014-05-20  浏览次数:20501 次

关于字符串过滤问题?
string   aa   =   " < ' < < < < ' < < < < < ' < < < < < < < < < < < < < < < < < < < ";
                aa.Replace( " < ",   "aaa ");
                Response.Write(aa);

我这样写怎么过滤不掉的??
还有我想把一段Html   写入数据库应该怎么做比较好?
    menu   =   ") '   background= 'images/title.gif '   style= 'cursor:hand '> ";
这样总是提示有单引号?
却过滤不掉!
解决马上给分!

------解决方案--------------------
string aa = " < ' < < < < ' < < < < < ' < < < < < < < < < < < < < < < < < < < ";
aa = aa.Replace( " < ", "aaa ");
Response.Write(aa);
------解决方案--------------------
string aa = " < ' < < < < ' < < < < < ' < < < < < < < < < < < < < < < < < < < "; aa =aa.Replace( " < ", "aaa "); Response.Write(aa); 要取返回值。