用Server.HtmlEncode后,所有非法字符都被当做字符型字符串显示出来了,是不是就不用public string CleanUpInput(string strInput)
{

strInput = strInput.Replace("[","");
strInput = strInput.Replace("]","");
strInput = strInput.Replace("{","");
strInput = strInput.Replace("}","");
strInput = strInput.Replace(";","");
strInput = strInput.Replace("&","");
strInput = strInput.Replace("<","");
strInput = strInput.Replace(">","");
return strInput;
}来过滤非法字符了?