asp.net中,在文本框中输入javascrip脚本<script>alert('');</script>,怎样将数据保存在数据库中,
中,在文本框中输入javascrip脚本<script>alert('');</script>,怎样将数据保存在数据库中,并且不出错加上ValidateRequest="false"不起作用
2013-06-27 09:19
2013-06-27 12:03
2013-06-27 12:53
2013-06-27 13:01
2013-06-27 13:11
2013-06-27 13:11
2013-06-27 13:56
程序代码:
void Application_Error(object sender,EventArgs e)
{
Exception ex=Server.GetLastError();
if(HttpContext.Current.Server.GetLastError() is HttpRequestValidationException)
{
HttpContext.Current.Response.Write("请输入合法字符串【<a href=\"javascript:history.back(0);\">返回</a>】");
HttpContext.Current.Server.ClearError();
}
}
2013-07-01 18:03