Search code examples
c#asp.netckeditor

CKEditor on ASP.NET C#


Trying to integrate CKEditor into my asp.net application.... I downloaded both CKEditor 3.x and the CKEditor for ASP.NET control and added the CKEditor reference to the site I also this to the application

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="CKEditor.aspx.cs" Inherits="CKEditor" %>
<%@ Register Assembly="CKEditor.NET" Namespace="CKEditor.NET" TagPrefix="CKEditor" %>

<!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>CKEditor</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <CKEditor:CKEditorControl ID="CKEditor1" BasePath="/ckeditor/" runat="server">
        </CKEditor:CKEditorControl>
    </div>
    </form>

but I am getting this error.

 CS0426: The type name 'NET' does not exist in the type 'CKEditor'
    <%@ Register Assembly="CKEditor.NET" Namespace="CKEditor.NET" TagPrefix="CKEditor" %>

I have searched all through the internet for solutions but it seems I am the only one having this kind of problem...please can someone help.


Solution

  • You have named your aspx file as CKEditor, the same name as your control assembly name having a namespace with same name, so there is a collision.

    Try changing your aspx name to something else such as CKEditorTest.aspx instead of CKEditor.aspx

    Its always better NOT to name your project, solution, class, control, literal, namespace etc. by any of the reserved keywords or other existing controls, classes, namespaces.