特殊字符验证抛出服务器错误。 [英] Special character validation throwing Server error .

查看:112
本文介绍了特殊字符验证抛出服务器错误。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个RegularExpressionValidator如下



 ValidationExpression =  ([A-Za-z0-9] +) 





当我输入< text>时,我的一个文本框在文本框上单击提交它给出服务器错误如下



从客户端检测到一个潜在危险的Request.Form值(tbID =< test>)。< / test> 

解决方案

它会帮助你:

ASP.NET 4.0潜在危险的Request.Form值是检测到 [ ^ ]


它与验证表达式无关。这是你的数据的问题。您的数据具有类似(<>)的html内容。为此,您可以将页面/网站的验证模式设置为false。

查看此链接

http://www.asp.net/whitepapers/request-validation

http://www.cryer.co.uk/brian/mswinswdev/ms_vbnet_server_error_potentially_dangerous.htm

检测到ASP.NET 4.0潜在危险的Request.Form值

< a href =http://stackoverflow.com/questions/81991/a-potentially-dangerous-request-form-value-was-detected-from-the-client> http://stackoverflow.com/questions/81991 / A-潜在危险请求型 - 值被检测到的从 - 所述客户端

I have one RegularExpressionValidator as follows

ValidationExpression="([A-Za-z0-9 ]+)"



for one of my Text box when I enter <text> on the text box and click on submit it gives server error as follows

A potentially dangerous Request.Form value was detected from the client (tbID="<test>").</test>

解决方案

it will help you :
ASP.NET 4.0 potentially dangerous Request.Form value was detected[^]


It is not related to validation expression. It is problem of your data. Your data is having html content like(<>). For this you can set validation mode of page/site to false.
Check this links
http://www.asp.net/whitepapers/request-validation
http://www.cryer.co.uk/brian/mswinswdev/ms_vbnet_server_error_potentially_dangerous.htm
ASP.NET 4.0 potentially dangerous Request.Form value was detected
http://stackoverflow.com/questions/81991/a-potentially-dangerous-request-form-value-was-detected-from-the-client


这篇关于特殊字符验证抛出服务器错误。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆