Click here to Skip to main content
Click here to Skip to main content

Solution to ASP.NET Theme Conflict with FCKEditor

, 2 Dec 2009
Rate this:
Please Sign up or sign in to vote.
Solution to ASP.NET theme conflict with FCKEditor

Introduction

According to me, FCKeditor is the finest HTML editor till today. It is very popular among web developers because of its rich set of useful features. It's also compatible with ASP.NET. But it has some issues with the ASP.NET page theme. When uploading file or image through editor, it displays wired XML parse error stating that "Using themed CSS files requires a header control on the page".

Using the Code

I went through the forums and found that it's a common error while integrating with ASP.NET pages that use themes. After going through different forums and digging the source codes, I got the solution. Basically we need to make some changes to be compatible with page themes on ~/fckeditor/filemanager/connectors/aspx/config.ascx file under our webservers fckeditor file.

snpashot2.GIF

As you can see above, "UserFilesPath" is specified, we need to put Page.ResolveUrl when specifying the value, i.e. we need to put something like:

UserFilesPath =Page.ResolveUrl("~/userfiles/");

[In this case, my default user files upload folder is "userfiles" under web servers root directory].

snpashot.GIF

Another point is that we don't need ASP.NET themes within the fckeditor folder, so simply add a web.config file in the folder as shown in the above screenshot, with the following content:

<configuration>
<appSettings/>
<connectionStrings/>
<system.web>
<pages styleSheetTheme="" theme=""> </pages>
</system.web>
</configuration> 

Those lines will do the trick. It will disable the page theme and site theme if specified and under fckeditor folder, no page theme will be available. Hope this will help developers and prevent them from wasting their time just to find out this silly solution.

History

  • 2nd December, 2009: Initial post

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

Shahriar Iqbal Chowdhury/Galib
Technical Lead
Bangladesh Bangladesh
I am a Software Engineer and Microsoft .NET technology enthusiast. Professionally I worked on several business domains and on diverse platforms. I love to learn and share new .net technology and my experience I gather in my engineering career. You can find me from here
 
Personal Site
Personal Blog
FB MS enthusiasts group
About Me

Comments and Discussions

 
GeneralASP.NET Theme Conflict with FCKEditor Pingroupelizas26-Jan-10 23:53 
GeneralThan you PinmemberLastPhoenix7-Dec-09 7:40 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Mobile
Web04 | 2.8.140721.1 | Last Updated 2 Dec 2009
Article Copyright 2009 by Shahriar Iqbal Chowdhury/Galib
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid