A common problem when using a rich text editor is the "potentially dangerous Request.Form value detected" by the ASP. The general solution is to add validaterequest= ' false ' to the page tab of the ASPX pages, but that's not safe.
It doesn't have to be effective, okay, let's talk about my solution, which is to not allow rich text content to be submitted at the time of submission, first to encode the content to a hidden tag, and then assign a null value to the rich text.
1Kindeditor.ready (function(K) {2Editor = k.create (' #txtIntroduction ', {3 items: [4' Bold ', ' italic ', ' underline ', ' | ', ' insertorderedlist ', ' insertunorderedlist ', ' | ', ' image ', ' | ', ' ForeColor ', ' Hilitecolor ', ' fontname ', ' fontsize ', ' | ', ' source '5 ],6Uploadjson: '. /.. /scripts/kindeditor/uploadpic.aspx ',7Aftercreate:function () {8 This. sync ();9 },TenAfterblur:function () { One This. sync (); A }, -AfterChange:function () { - This. sync (); the } - }); - }); - }); + - functionAddcheck () { +$ ("#hdIntroduction"). Val (Escape (Editor.html ())); A$ (' #txtIntroduction '). Val (""); atEditor.html (""); - } -<asp:button id= "Btnsave" text= "Save Settings" runat= "Server" onclick= "Btnsave_click" onclientclick= "return Addcheck ();"/ >
View Code
Kindeditor Rich Text editor, detects potentially dangerous request.form values from the client