1. 程式人生 > >CKEDITOR的內容js轉碼,C#控制器解碼接收

CKEDITOR的內容js轉碼,C#控制器解碼接收

1 <script type="text/javascript" src="<%=Url.Content("~/Resource/ckeditor/ckeditor.js") %>"></script><!--ckeditor-->
2 
3 <%=Html.TextAreaFor(Model=>Model.WORK_INTRODUCTION)%>
4 <script type="text/javascript">
5 CKEDITOR.replace('WORK_INTRODUCTION');
6 </script>

ckeditor:

js轉碼:

1 escape(CKEDITOR.instances.WORK_INTRODUCTION.getData())

Control解碼:

1 Convert.ToString(HttpUtility.UrlDecode(Request.Form["WORK_INTRODUCTION"]))