Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

how to send TextEditor text to Generic handler

Posted on 2014-08-26
2
Medium Priority
?
198 Views
Last Modified: 2014-08-28
I am using one text editor on my web form
https://github.com/mindmup/bootstrap-wysiwyg/

and I am trying to write the code to save the text editor value/html in database by calling a Jquery Ajax method and I am calling a generic handler to save the values.

Now it works fine if I only type simple  text in the editor but as soon as I enter or apply any styling and try to save it, I gets this error " A potentially dangerous Request.Form value was detected from the client ".

How can I save the html of editor field in my database?
0
Comment
Question by:yadavdep
2 Comments
 
LVL 58

Expert Comment

by:Gary
ID: 40286099
It's because you probably have < > in the post value

To the page directive add
ValidateRequest="false"

If .net 4 then you will also need to add to your web.config in the httpRuntime section
<httpRuntime requestValidationMode="2.0"/>
0
 
LVL 11

Accepted Solution

by:
Murfur earned 2000 total points
ID: 40288303
Operating blind (post your code so that we have something to work from (please!)) you can use the JavaScript function escape()
var newString = escape( oldString );

Open in new window

0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
In real business world data are crucial and sometimes data are shared among different information systems. Hence, an agreeable file transfer protocol need to be established.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

580 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question