标签:style blog http color io for cti div
/// <summary> /// ASP.NET4.0 表单验证类 /// </summary> public class FormRequestValidation : RequestValidator { public FormRequestValidation() { } protected override bool IsValidRequestString(HttpContext context, string value, RequestValidationSource requestValidationSource , string collectionKey, out int validationFailureIndex) { //不验证 validationFailureIndex = -1; return true; } }
web.config加上
<system.web> <!--new 添加该节点对request.form的验证进行设定 --> <httpRuntime requestValidationType="namespace.FormRequestValidation" /> </system.web>
ASP.NET 4.0 取消表单危险字符验证,布布扣,bubuko.com
标签:style blog http color io for cti div
原文地址:http://www.cnblogs.com/mahatmasmile/p/3872784.html