Opened 14 years ago

Closed 13 years ago

#6343 closed Bug (expired)

FCK not working very well with and ajax

Reported by: Cade Owned by:
Priority: Normal Milestone:
Component: Server : ASP.Net Version: FCKeditor 2.6.5
Keywords: Cc:

Description (last modified by Krzysztof Studnik)

After entering in something with html formatting into the FCK editor, the next partial postback will give an error. The one after that will be fine and it will alternate back and forth like that until the page is refreshed. Full postbacks don’t error like the partial postbacks do.


  1. Create a new aspx project in Visual Studio 2008.
  2. Include the fckeditor folder
  3. Include the ajax toolkit binary and the FCK asp wrapper binary file in the bin folder of the project.
  4. Add a page named testFCK to the site with the following code:


<%@ Page Language="C#" AutoEventWireup="true" CodeFile="testFCK.aspx.cs" Inherits="testFCK" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<%@ Register Assembly="FredCK.FCKeditorV2" Namespace="FredCK.FCKeditorV2" TagPrefix="FCKeditorV2" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
<html xmlns="">
<head runat="server">
    <form id="form1" runat="server">
        <ajaxToolkit:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
        <asp:UpdatePanel runat="server" UpdateMode="Conditional" ID="up">
                <asp:PostBackTrigger ControlID="btnFull" />
                <FCKeditorV2:FCKeditor runat="server" ID="Body" BasePath="fckeditor/" ToolbarSet="Default"
                    Height="400px" HtmlEncodeOutput="true" EnableViewState='false'>
                <asp:Button runat="server" OnClick="posted" Text="Partial" />
                <asp:Button ID="btnFull" runat="server" OnClick="posted" Text="Full" />
                <asp:Label runat="server" ID="lblTest"></asp:Label>


using System;
using System.Web;

public partial class testFCK : System.Web.UI.Page
    protected override void OnError(EventArgs e)
        HttpContext ctx = HttpContext.Current;
        Exception exception = ctx.Server.GetLastError();

    protected void Page_Load(object sender, EventArgs e)
            Body.Value = "hello<br />World!";

    protected void posted(object sender, EventArgs e)
        lblTest.Text += "Posted back successfully!";
        Body.Value += "<br>Again!";
  1. Open the site up in the debugger.
  2. Click the button labeled "partial". Note that the first click does nothing (because it causes an error before the Page_Load method). Also note that the button works the 2nd/4th/6th etc... time.
  3. Click the button labeled "full". Note that it works every time.

The testing environment I'm running this on is Visual Studio 2008, Microsoft Windows XP SP3. Tested on Firefox 3.6.10, but I'm pretty sure I've seen it happen in current versions of IE and Chrome as well.

The workaround that I'm currently using for this is to do a full postback whenever I want to submit the FCKEditor content and then cause a complete refresh in the codebehind. But that workaround is not ideal.

Attachments (2)

testFCK.aspx (1.5 KB) - added by Cade 14 years ago.
testFCK.aspx.cs (734 bytes) - added by Cade 14 years ago.

Download all attachments as: .zip

Change History (6)

Changed 14 years ago by Cade

Attachment: testFCK.aspx added

Changed 14 years ago by Cade

Attachment: testFCK.aspx.cs added

comment:1 Changed 14 years ago by Cade

I forgot to mention that the specific error that it throws is a "A potentially dangerous Request.Form value was detected from the client..."

comment:2 Changed 14 years ago by Krzysztof Studnik

Description: modified (diff)
Keywords: ajax async postback removed

comment:3 Changed 13 years ago by sandhya pingle


I am facing the same issue? is there any fix for this.


comment:4 Changed 13 years ago by Wiktor Walc

Resolution: expired
Status: newclosed

There is a new ASP.NET control available: CKEditor for ASP.NET. The old control (FCKeditor.Net) is no longer maintained, so I'm closing the ticket. In the new CKEditor control we have solved many issues with ASP.NET AJAX.

However, if you still find a similar bug in CKEditor 3.x, please create a new ticket for it.

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy