Hi, i am trying to take a script as input in Textbox and then would want to display it in literal control However, when i try to do so, i get an error : I changed ValidateRequest="false" in the @Page Directive too but to no use. Any Suggestions ?
I googled around and found that ValidateRequest="false" doesnt work in .NET framework 4.0 One has to modify the web.config in the following way
Be aware of using that though. You will need to check every user input to prevent cross-site scripting( very popular this days ) and other potential security issues. For example, see this article http://en.wikipedia.org/wiki/Cross-site_scripting .
If you are allow this. There is a possibility of attacks to your site. If you still wants this option you must track the user inputs
In my experience, the warning is overly harsh and asserted when it is not needed. You should still check your inputs.