This is a migrated thread and some comments may be shown as answers.

FCKEditor

4 Answers 157 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Mike Fleming
Top achievements
Rank 1
Mike Fleming asked on 29 Dec 2010, 08:57 PM
We have an application that uses FCKEditor.  
When we wrap a RadAjaxPanel around the FCKEditor we receive the following error during postback:

"Error: Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned from the server was: 500"

I've spent the day google-ing for an answer and have found LOTS of references to FCKEditor with UpdatePanel, and AJAX in general, but nothing specific to RadAjaxPanel.  Is there a work-around?  Can I get FCKEditor to work in a RadAjaxPanel?

One note I found suggested setting the @Page directive ValidateRequest="false".  This makes the error message go away, however any edits made in FCKEditor are not sent back to the server.  When I read the .value of the FCKEditor control it's the same as it was when the control was first loaded up.

(sidenote: we may migrate to RadEditor at some point in the future when time allows)

4 Answers, 1 is accepted

Sort by
0
Nikolay Rusev
Telerik team
answered on 30 Dec 2010, 09:25 AM
Hello Mike,

The error code says that there is server exception. You can debug the code or simply set EnableAjax to false of RadAjaxPanel and will see the real stack trace of the exception.

Greetings,
Nikolay
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
Mike Fleming
Top achievements
Rank 1
answered on 30 Dec 2010, 02:24 PM
Nikolay,

Thanks for your response.
When I set the EnableAjax property of the RadAjaxPanel to "false" I get no errors.  Everything works properly.  Errors only occur when Ajax is enabled.

I've attached a sample project that exhibits this behavior.  If you set the "useFCK" and "useAJAX" to true in the default.aspx.cs file you will see the failure.

default.aspx
<%@ Page Language="C#" AutoEventWireup="True" CodeBehind="default.aspx.cs" Inherits="FCKeditorTest._default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server"></telerik:RadScriptManager>
        <telerik:RadAjaxLoadingPanel ID="radLoadingPanel" runat="server" Skin="Default"></telerik:RadAjaxLoadingPanel>
        <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" LoadingPanelID="radLoadingPanel">
            <div>
                <FCKeditorV2:FCKeditor ID="fckSummary" runat="server" Width="600" Height="320" BasePath="/fckeditor/" />
                <asp:TextBox ID="TextBox2" runat="server" Height="280px" Rows="10" TextMode="MultiLine" Width="600px"></asp:TextBox>
            </div>
            <div>
                <asp:Button ID="Button1" runat="server" Text="Copy >>" onclick="Button1_Click" />
            </div>
            <div>
                <asp:TextBox ID="TextBox1" runat="server" Height="280px" Rows="10" TextMode="MultiLine" Width="600px"></asp:TextBox>
            </div>
        </telerik:RadAjaxPanel>
    </form>
</body>
</html>

default.aspx.cs

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace FCKeditorTest
{
    public partial class _default : System.Web.UI.Page
    {
        protected bool useFCK = true;       //Change to true to use FCKeditor
        protected bool useAJAX = false;     //Change to true to use AJAX

        protected void Page_Load(object sender, EventArgs e)
        {
            RadAjaxPanel1.EnableAJAX = useAJAX;
            TextBox2.Visible = !(fckSummary.Visible = useFCK);
        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            TextBox1.Text = useFCK ? HttpUtility.HtmlEncode(fckSummary.Value) : TextBox2.Text;
        }
    }
}

0
Mike Fleming
Top achievements
Rank 1
answered on 04 Jan 2011, 01:14 PM
ping?
0
Nikolay Rusev
Telerik team
answered on 05 Jan 2011, 08:34 AM
Hello Mike,

I am attaching sample project that I am using to experiment with FCKEditor in ASP.NET. It seems that even when you type a text in it and postback error is thrown. This error will be shown as the message that you reported on ajax even using UpdatePanel's instead of RadAjax.

All the best,
Nikolay
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
Tags
Ajax
Asked by
Mike Fleming
Top achievements
Rank 1
Answers by
Nikolay Rusev
Telerik team
Mike Fleming
Top achievements
Rank 1
Share this question
or