ASP.NET Integration

This website contains links to software which is either no longer maintained or will be supported only until the end of 2019 (CKFinder 2). For the latest documentation about current CKSource projects, including software like CKEditor 4/CKEditor 5, CKFinder 3, Cloud Services, Letters, Accessibility Checker, please visit the new documentation website.

If you look for an information about very old versions of CKEditor, FCKeditor and CKFinder check also the CKEditor forum, which was closed in 2015. If not, please head to StackOverflow for support.

 
(13 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 +
{{#CUSTOMTITLE:ASP.NET Integration}}
 
It is very easy to use FCKeditor in your ASP.NET web pages. Just follow these steps.
 
It is very easy to use FCKeditor in your ASP.NET web pages. Just follow these steps.
  
== Integration step by step ==
+
== Configuring your site ==
  
 
=== Step 1 ===
 
=== Step 1 ===
Line 25: Line 26:
 
You can include the control in your Visual Studio.NET controls toolbox. Just right-click on it and select "Choose Items". Then, just point to the FredCK.FCKeditorV2.dll file by using the "Browse" option. Remember to make sure that you have the latest version of the dll. It may be worthwhile to recompile from the source if you are having issues getting the upload and connector features to work.
 
You can include the control in your Visual Studio.NET controls toolbox. Just right-click on it and select "Choose Items". Then, just point to the FredCK.FCKeditorV2.dll file by using the "Browse" option. Remember to make sure that you have the latest version of the dll. It may be worthwhile to recompile from the source if you are having issues getting the upload and connector features to work.
  
== Step 3 ==
+
== Integration ==
 +
 
 +
=== Step 1 ===
  
 
Now the editor is ready to be used in your site, so just create an ASP.NET page. To create an instance of the editor, you have two options:
 
Now the editor is ready to be used in your site, so just create an ASP.NET page. To create an instance of the editor, you have two options:
Line 33: Line 36:
  
 
* Include this line in the top of the page:
 
* Include this line in the top of the page:
<pre>&lt;%@ Register Assembly="FredCK.FCKeditorV2" Namespace="FredCK.FCKeditorV2" TagPrefix="FCKeditorV2" %&gt;</pre>  
+
<pre>&lt;%@ Register Assembly="FredCK.FCKeditorV2" Namespace="FredCK.FCKeditorV2" TagPrefix="FCKeditorV2"&nbsp;%&gt;</pre>  
 
* Add the editor tag inside the &lt;form runat="server"&gt;:
 
* Add the editor tag inside the &lt;form runat="server"&gt;:
<pre>&lt;FCKeditorV2:FCKeditor ID="FCKeditor1" runat="server"&gt;&lt;/FCKeditorV2:FCKeditor&gt;</pre>
+
<pre>&lt;FCKeditorV2:FCKeditor ID="FCKeditor1" runat="server"&gt;&lt;/FCKeditorV2:FCKeditor&gt;</pre>
 +
=== Step 2 ===
 +
 
 +
The editor is now ready to be used. Just open the page in your browser to see it at work.<br>
  
 
=== Sample Code ===
 
=== Sample Code ===
 +
<pre>&lt;%@ Page Language="C#"%&gt;
 +
 +
&lt;%@ Register Assembly="FredCK.FCKeditorV2" Namespace="FredCK.FCKeditorV2" TagPrefix="FCKeditorV2"&nbsp;%&gt;
  
<pre>
+
&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
<%@ Page Language="C#"%>
 
  
<%@ Register Assembly="FredCK.FCKeditorV2" Namespace="FredCK.FCKeditorV2" TagPrefix="FCKeditorV2" %>
+
&lt;html xmlns="http://www.w3.org/1999/xhtml" &gt;
 +
&lt;head runat="server"&gt;
 +
&lt;title&gt;Sample Page&lt;/title&gt;
 +
&lt;/head&gt;
 +
&lt;body&gt;
 +
&lt;form id="form1" runat="server"&gt;
  
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
&lt;FCKeditorV2:FCKeditor ID="FCKeditor1" runat="server"&gt;
 +
&lt;/FCKeditorV2:FCKeditor&gt;
  
<html xmlns="http://www.w3.org/1999/xhtml" >
+
&lt;div&gt;
<head runat="server">
+
&lt;/div&gt;
<title>Sample Page</title>
+
&lt;input type="submit" value="Submit" runat="server" /&gt;
</head>
+
&lt;/form&gt;
<body>
+
&lt;/body&gt;
<form id="form1" runat="server">
+
&lt;/html&gt;
 
+
</pre>  
<FCKeditorV2:FCKeditor ID="FCKeditor1" runat="server">
+
== Additional information ==
</FCKeditorV2:FCKeditor>
 
  
<div>
+
* You can find some samples on how to use the editor in the "_samples/aspx" directory of the FCKeditor.Net distribution package. To install the samples, just copy that directory to the _samples directory found in the FCKeditor core package installation.
</div>
 
<input type="submit" value="Submit" runat="server" />
 
</form>
 
</body>
 
</html>
 
</pre>
 

Latest revision as of 17:30, 30 January 2008

It is very easy to use FCKeditor in your ASP.NET web pages. Just follow these steps.

Configuring your site

Step 1

First step you should take in order to integrate FCKeditor with ASP.NET environment is downloading the FCKeditor .Net package from our dowlnoad site. You can find the latest version of the package under this address:

http://www.fckeditor.net/download

Note: The main code is not included in this package, just the ASP.NET Control. You still need the FCKeditor scripts to be able to run it, so you should download it as well

Step 2

Unpack the downloaded file. There you will find the original source code of the control and a compiled version of it. The file is called FredCK.FCKeditorV2.dll. You can find it in two catalogs:

  • bin/Release/1.1/ - the version designed for ASP.NET 1.1
  • bin/Release/2.0/ - the version designed for ASP.NET 2.0

You most probably will not need to make changes in the source, so just consider the compiled DLL file, and just create a reference to it in your project. You have two options to do that:

  1. Manually copy the FredCK.FCKeditorV2.dll file to the "bin" directory of your web site.
  2. Right-click "References" in your Visual Studio.NET project in the "Solution Explorer". Use "Browse" to select the FredCK.FCKeditorV2.dll file from the directory you have saved it in.

You can include the control in your Visual Studio.NET controls toolbox. Just right-click on it and select "Choose Items". Then, just point to the FredCK.FCKeditorV2.dll file by using the "Browse" option. Remember to make sure that you have the latest version of the dll. It may be worthwhile to recompile from the source if you are having issues getting the upload and connector features to work.

Integration

Step 1

Now the editor is ready to be used in your site, so just create an ASP.NET page. To create an instance of the editor, you have two options:

  1. Drag and drop the control "FCKeditor" from the toolbox to you page.(this method will only work if you included the "FCKeditor" control in the toolbox - see Step 2 for the description)
  2. Manually add lines of code in your ASP.NET source page:
  • Include this line in the top of the page:
<%@ Register Assembly="FredCK.FCKeditorV2" Namespace="FredCK.FCKeditorV2" TagPrefix="FCKeditorV2" %>
  • Add the editor tag inside the <form runat="server">:
<FCKeditorV2:FCKeditor ID="FCKeditor1" runat="server"></FCKeditorV2:FCKeditor>

Step 2

The editor is now ready to be used. Just open the page in your browser to see it at work.

Sample Code

<%@ Page Language="C#"%>

<%@ Register Assembly="FredCK.FCKeditorV2" Namespace="FredCK.FCKeditorV2" TagPrefix="FCKeditorV2" %>

<!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>Sample Page</title>
</head>
<body>
<form id="form1" runat="server">

<FCKeditorV2:FCKeditor ID="FCKeditor1" runat="server">
</FCKeditorV2:FCKeditor>

<div>
</div>
<input type="submit" value="Submit" runat="server" />
</form>
</body>
</html>

Additional information

  • You can find some samples on how to use the editor in the "_samples/aspx" directory of the FCKeditor.Net distribution package. To install the samples, just copy that directory to the _samples directory found in the FCKeditor core package installation.
This page was last edited on 30 January 2008, at 17:30.