When I put value in textbox then its throught this error. I am making Content Management System.
A potentially dangerous Request.Form value was
detected from the client (elm1="<p>ABC</p>").
when page go to server then it’s through error.
Please assist.
The .NET framework is throwing up an error because it detected something in the entered text which looks like an HTML or Javascript statement. The text doesn’t need to contain valid HTML, just anything with opening and closing angled brackets (
"<...>").The reason behind the error is as a security precaution. Developers need to be aware that users might try to inject HTML (or even a script) into a text box which may affect how the form is rendered. For further details see http://www.asp.net/learn/whitepapers/request-validation/.
Solutions:
To disable request validation on a page add the following directive to the existing “page” directive in the file (you will need to switch to the HTML view for this):
for example if you already have:
then this should become:
Alternately, you can globally turn request validation off (but in which case be sure to implement item two below). To globally turn request validation off add the following to your web.config file:
this should go within the
<system.web>section. This will turn off request validation for every page in your application.Source