Click here to Skip to main content
15,867,762 members
Articles / Web Development / XHTML

Solution to ASP.NET Theme Conflict with FCKEditor

Rate me:
Please Sign up or sign in to vote.
4.67/5 (9 votes)
2 Dec 2009CPOL1 min read 24.5K   16   2
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:

XML
<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)


Written By
Chief Technology Officer
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 Pin
elizas26-Jan-10 23:53
elizas26-Jan-10 23:53 
GeneralThan you Pin
whiteswan7-Dec-09 7:40
whiteswan7-Dec-09 7:40 

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

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