3

First I got an exception : System.Web.HttpRequestValidationException (0x80004005): A potentially dangerous Request.Form value.... from searching the web I found that adding to my web.config :

<system.web>
   <httpRuntime requestValidationMode="2.0" />
</system.web>

should solve the problem, but I get an error : requestValidationMode is not allowed. I am using framework 3.5, maybe thats the reason... can someone help ?

user2560521
  • 476
  • 2
  • 6
  • 18

1 Answers1

1

In 3.5, you don't need the requestvalidationmode. To suppress asp.net validation on postback, just set the @Page parameter validaterequest="false" in the .aspx.

You need this if, for example, you are handling submitted HTML. You also then need to sanitize your input carefully.

Henry Troup
  • 180
  • 5