zoukankan
html css js c++ java
一种简单的检测form非法字符串
protected
override
void
OnError(EventArgs e)
{
Exception lastException
=
this
.Server.GetLastError();
determin if it is HttpRequestValidationException
#region
determin if it is HttpRequestValidationException
if
( lastException
is
HttpRequestValidationException)
{
string
returnJS
=
string
.Format(
"
<script>alert('{0}');window.history.back();</script>
"
, Accor.Vel.CoreToolKit.Utilities.Language.GetResource(
"
InputError
"
,
this
.Page ) );
this
.Page.RegisterStartupScript( Guid.NewGuid().ToString().Replace(
"
-
"
,
""
), returnJS );
Response.Write( returnJS );
Server.ClearError();
return
;
}
}
在pagebase里面,catch住HttpRequestValidationException,处理一把就可以了~
查看全文
相关阅读:
OC面向对象—封装
OC面向对象—继承
hdu 4612 Warm up(缩点+树上最长链)
hdu 4604 Deque(最长不下降子序列)
hdu 4607 Park Visit(树上最长链)
hdu 4609 3-idiots(快速傅里叶FFT)
codeforces 333B
codeforces 333A
codeforces 334B
codeforces 334A
原文地址:https://www.cnblogs.com/jinweijie/p/1219288.html
最新文章
锁并不慢,而是锁间竞争导致变慢
千里之行,始于足下
第42天python学习内置函数的shelve XML
第42天python学习内置 模块json pickle
第41天python学习内置模块os sys模块
第40天python学习内置模块random BASEDIR-——————待补充不明白的内容
第39天python学习内置模块time模块
第34天python学习装饰器:函数嵌套
第33天pytho学习装饰器:高级函数部分演示
第32天学习习题学习——————待周末学习补上
热门文章
第31次学习python生成器总结
补上:第30学习python生成器
Foundation框架—结构体
OC语言BLOCK和协议
OC语言类的深入和分类
OC语言description方法和sel
OC语言@property @synthesize和id
OC语言构造方法
OC面向对象—多态
OC点语法和变量作用域
Copyright © 2011-2022 走看看