What do I do when the page edits or runs the submission with a "potentially dangerous Request.Form value detected from the client" issue? As shown in: potentially dangerous detected from the client Request below the blogger summarizes several workarounds for this error: The cause of the problem: because in ASP. NET, when a request commits a string such as HTML code or JavaScript, the program system considers it to be a potentially dangerous value. The environment configuration will report an error such as "potentially dangerous Request.Form value detected from the client". 1, the current submission page, add code to open the current. aspx page, the page header plus code: validaterequest= "False", such as: <%@ page language= "C #" validaterequest= "false" Autoeventwireup= "false" codefile= "Default.aspx.cs" inherits= "Default"%>2, globally modifies the Web. config profile (this does not recommend, Not secure) Open the Web. config file, In the middle, add the following code: If neither of these methods can be resolved, then look down, the problem is: because your current. NET Ifreamwork framework environment is 4.03, open the Web. config configuration file, Middle, plus code: 4, if your website program itself is NET 2.0 environment development, but put in the VS2010 software run, also will appear this situation, you can switch the operation solution to net2.0 can, replacement method see page 3rd step: Click to enter 5, Another approach: The reason is that the transmitted value contains a special hazard symbol, then you can use the Server.HTMLEncode (string) method to encode the string before passing it, so that the dangerous word escapes to ordinary characters. such as Textbox1.text=server.htmlencode (str); Learn more, refer to Microsoft Web page: Http://www.asp.net/whitepapers/request-validation found the original 3 years ago, There is a brief summary of this problem solving method, but not so comprehensive, it seems that experience can make people grow is right, there is a summary of this issue article: VS2005 Debugging Problem Solution collection//--------------------------------------------- Add-------------------------------------------------------------------------------//webconfig
Potentially dangerous Request.Form value detected from the client [workaround]