This is a migrated thread and some comments may be shown as answers.

Rad Editor rich text : Error when post image

1 Answer 83 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Fabrice
Top achievements
Rank 1
Fabrice asked on 25 Jan 2012, 05:28 PM
Hello,

My application is in ASP.NET 4.0.
I have a Rad Editor rich text and when i put an image in the editor i have a Exception ASP.NET on validation.

A potentially dangerous Request.Form value was detected from the client.

Have you an idea of the problem ?

Thanks

1 Answer, 1 is accepted

Sort by
0
Richard
Top achievements
Rank 1
answered on 26 Jan 2012, 03:41 PM
Fabrice:

When you submit the page, the browser collects the values of all input and textarea elements on that page and send them to the server. In HTML mode the editor's content is a textarea which means that it is send to the server in every page postback .

"A potentially dangerous Request.Form value was detected from the client." exception is thrown every time when the ASP.NET framework detects HTML in a form element's value. The best solution is use the Rad Editor's Content Property on the server to get and modify the content. You can then use the Editor's "ContentEncoder" to modify it.

There's a very useful Encoding the Html on the client forum thread that provides an example on doing this.

Hope this helps!

Tags
Editor
Asked by
Fabrice
Top achievements
Rank 1
Answers by
Richard
Top achievements
Rank 1
Share this question
or