views:

81

answers:

1

I am new to asp.net. I am using "tinymce", there I am using html tables. On click of a button it's throwing an error:

A potentially dangerous Request.Form value was detected from the client 
(txtspecification="<table border="1" ce...").

Can anyone please help me in solving this? Thanks in advance.

+4  A: 

Your problem will be that you are posting back to an ASP.NET page which has 'request validation' turned on. Essentially, the HTML from tinymce will contain angle brackets and that (amongst other things) will trip ASP.NET's security checking functionality (which is trying to trap cross-site scripting attacks). You can turn off request validation in the ASP.NET page.

Turning off request validation in page using page directive:

<%@ Page validateRequest="false" %> 
Yellowfog
thank you for replying but i have added "<%@ Page validateRequest="false" %> " but still its trowing same error
Patel
thank you for your reply..i have added the code "<%@ Page validateRequest="false" %> " but still i am getting the same error" any other solution pls...
Patel
Hmm. I suspect further user error. Maybe try turning off request validation entirely in web.config, by putting <pages validateRequest="false" /> in the <system.web> section. And be wary of cross-site scripting problems.
Yellowfog
sorry for telling this.. i have used <pages validateRequest="false" /> in web.config file but still same error... pls give any solutions for this
Patel
Are you using classic ASP.NET or ASP.NET MVC?
Yellowfog
i am using asp.net
Patel