Downloading FCKEditor
You can download the FCKeditor from its official website, http://www.fckeditor.net. The current available version is 2.6.4.
1. Download the ASP.Net version of FCKeditor called FCKeditor.Net from the link http://www.fckeditor.net/download
2. FCKeditor.Net package is just the asp.net control and you need to download the supporting source files from the above location. You can find this in the top 2 links in the same page. Download the zip file (FCKeditor 2.6.4).
Integrating and using in ASP.Net Page
1. Create a new ASP.Net website in Visual Studio 2005.
2. Unzip the ASP.Net FCKeditor zip file. You can add the FCKeditor in visual studio toolbox by Right click on the toolbox > Choose Item > Browse to the location where you have unzipped the control. You can find the dll file in location FCKeditor.Net_2.6.3\bin\Release for both 2.0 and 1.1 version of ASP.Net. I have selected the dll from 2.0 directory. You can see the control added to the toolbox.
You can now drag and drop the control in the aspx page.
Below you can find its aspx code generated. You will also find a Register directive on top of the page for the control.
<FCKeditorV2:FCKeditor runat=”server”>
</FCKeditorV2:FCKeditor>
Executing the page now will give you 404 page not found error. It is because; we have not added the FCKEditor source files into our project that we downloaded in Point (2) of the previous section (Downloading FCKEditor). Unzip the file and copy the fckeditor folder into the solution.
We need to specify the root folder of this source files through the BasePath property of FCKEditor.
<FCKeditorV2:FCKeditor BasePath=”fckeditor/” runat=”server”>
</FCKeditorV2:FCKeditor>
To access the text typed in the editor, we can use the server side property Value.
protected void btnSave_Click(object sender, EventArgs e)
{
Response.Write(rtfComments.Value);
}
Execute the page and you can see the FCKeditor appearing the screen.