We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Saving Content of RichTextEditor in Edit Controller [HttpPost]

Thread ID:

Created:

Updated:

Platform:

Replies:

107445 Mar 1,2013 11:51 PM Mar 4,2013 02:21 AM ASP.NET MVC (Classic) 1
loading
Tags: Tools
Marie CG
Asked On March 1, 2013 11:51 PM

I am using @Html.Syncfusion().RichTextEditor("RTE").Text(Model.Definition).ShowHtmlSource(false).AllowEdit(true) in my View/Edit.cshtml and the data is displayed fine.
 
Then, I would like to save my changes.  I am having difficulty retrieve the "RTE" content in the Edit Controller [HttpPost] using the following:
 
[HttpPost]
public ActionResult Edit(int id, FormCollection formCollection, string[] selectedPulldownData)
{
 //formCollection["RTE"]
}
 
In the debugger, I can see the formCollection["RTE"] value but is unable to retrieve the Rich Text Content.
 
Sorry if this is a simple question.  I am new at MVC/RAZOR/Syncfusion and in the process of trying to learn them all at the same time. Help!

Varalakshmi R.S [Syncfusion]
Replied On March 4, 2013 02:21 AM

Hi Marie,

 

Thanks for contacting Syncfusion forums.

 

We suggest you to use RichTextControl ‘s id in action arguments for retrieving the content of RTE. Please refer the below code snippet to achieve this,

<code>

[View]

@Html.Syncfusion().RichTextEditor("RTE").Text(Model.Definition).ShowHtmlSource(false).AllowEdit(true)

 

[Controller]

[HttpPost]

        public ActionResult Edit(int id, string RTE, string[] selectedPulldownData)

        {

            //RTE returns the content in RichTextEditor

        }

</code>

 

Kindly try the above suggested solution and let us know if it helps.

 

Regards,

Varalakshmi

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;