JoseMarmolejos
JoseMarmolejos

Reputation: 1770

Posting text with html tags without changing the requestValidationMode?

I implemented tinyMCE to fulfill the "we need a rich text editor" requirement but when posting the form to the controller I get the expected "A potentially dangerous Request.Form value was detected from the client" error, in .net 3.5 we could just use [ValidateInput=false] in the action and go on with it, but now we also have to set requestValidationMode to 2.0 in the webconfig.

Is there another way to have this particular action not validate the input without setting the requestValidationMode to 2.0 ?

Upvotes: 1

Views: 232

Answers (1)

Peter Lange
Peter Lange

Reputation: 2886

I believe that ValidateRequest is a property that you can set on the page receiving the request still. I assume, since you are making a previous comparison to .NET 3.5 you are now using .NET 4.0. I unfortunately do not have first hand experience with 4.0 as of yet, so please check to see if this is still in use.

<%@ Page Language="C#" ValidateRequest="false" %>

Upvotes: 1

Related Questions