views:

2290

answers:

4

I'm using the ASP.NET binary for my FCKeditor, and needs to insert two editors on the same page. The uploaded images/browsing needs to go to two different directories, how do I do this from code-behind?

I know the path for uploaded files are set in the config.ascx-file with the UserFilesPath setting, but I can not find a way to override this value from my aspx.cs file.

Also, I found (conflicting) documentation stating that Session["FCKeditor:UserFilesPath"] could be set, but I dont like putting usercontrol-specific information in a global session variable.

A: 

Oh dear, after much struggle only thing I'm able to get is:

fckEditor1.Config

property. Try setting it for the editor you want to configure:

fckEditor1.Config["UserFilesPath"]="your path"

TheVillageIdiot
Thank you for trying to help me, but this doesn't work. The config-property is only for the actual editor, not the editor filebrowser.
Espo
A: 

This will probably works. At least it worked for me.

Session["FCKeditor:UserFilesPath"] = "~/images/";
Sebastien Lachance
A: 

Sorry, I think your best bet is to stop using the control, and use the javascript api instead.

Bill Bingham
+1  A: 

first you need assign User Identity information into Session["UserInfo"]

then go to [fckeditor root folder]/filemanager/connector/aspx/config.ascx

string Userfolder = Session["UserInfo"].ToString(); // URL path to user files. UserFilesPath = "~/Upload/" + Userfolder;

D.J