Jan 21, 2013, 5:03 PM
[CLOSED] How to post ckeditor data ?
Hi,
I implemented a ckeditor within an MVC project I would like to post ckeditor data to the action but the form collection returns an empty data.
This is the code below :
ASPX code :
I implemented a ckeditor within an MVC project I would like to post ckeditor data to the action but the form collection returns an empty data.
This is the code below :
ASPX code :
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>
<%@ Register Assembly="CKEditor.NET" Namespace="CKEditor.NET" TagPrefix="CKEditor" %>
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<!DOCTYPE html>
<html>
<head runat="server">
<script type="text/javascript">
</script>
</head>
<ext:ResourceManager runat="server">
</ext:ResourceManager>
<body>
<form runat="server" id="formCk">
<CKEditor:CKEditorControl ID="CKEditor1" runat="server">
</CKEditor:CKEditorControl>
<ext:Button ID="btn" runat="server" Text="Save" Icon="Disk" StandOut="true">
<DirectEvents>
<Click FormID="formCk" Url="/Research/SaveCkEditor" Method="POST" CleanRequest="true"
Type="Submit" />
</DirectEvents>
</ext:Button>
</form>
</body>
</html>
This is the controller code :public class ResearchController : Controller
{
public ActionResult Research()
{
return View();
}
public AjaxFormResult SaveCkEditor(FormCollection value)
{
AjaxFormResult rslt = new AjaxFormResult();
string tmp = value["CKEditor1"];
return rslt;
}
}
Last edited by Daniil; Jan 24, 2013 at 4:41 AM.
Reason: [CLOSED]