Rad Editor rich text : Error when post image

2 posts, 0 answers
  1. Fabrice
    Fabrice avatar
    3 posts
    Member since:
    Sep 2011

    Posted 25 Jan 2012 Link to this post

    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
  2. Richard
    Richard avatar
    479 posts
    Member since:
    Nov 2011

    Posted 26 Jan 2012 Link to this post

    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!

Back to Top