I came across an issue while trying to submit html content in aspx.net, whereby an error stating: A potentially dangerous Request.Form value was detected from the client…

This was a little perplexing and I realized it is a security validation check done by the asp.net engine and can be bypassed with the ValidateRequest attribute in the Page (add it in the <@ Page tag). You can alternatively add this is the web.config but that would make it site-wide with its potential consequences and I would make it page-specific as a best practice.

Now, in my scenario, all I was doing was displaying snippets of html in a text-box. I did not care about submitting back the html. So, now I am trying to figure out how to populate the text-box on the server (using runat=server) but not have it submit back…

Advertisements