The following error occurs when submitting an ASP. net4.0 form:
A potentially dangerous request. form value was detected from the client (txtbackinfo = "<p> 111111 </P> <p> & nbs ...").
Description:Request validation has detected a potentially dangerous client input value, and processing of the request has been aborted. this value may be indicate an attempt to compromise the security of your application, such as a cross-site scripting attack. to allow pages to override application request validation settings, set the requestvalidationmode attribute in the httpruntime configuration section to req Uestvalidationmode = "2.0 ". example:
The solution is as follows:
1. modify web. config
<System. Web>
<Httpruntime requestvalidationmode = "2.0" type = "codeph" text = "/codeph"/>
Add
2. Modify aspx files
<% @ Page Language = "C #" autoeventwireup = "true" codefile = "bumentongzhiadd. aspx. cs" inherits = "gonggao_bumentongzhiadd" validaterequest = "false" %>
Add validaterequest = "false"
Resolved verified issues