Problem while setting the Image Directory programatically

  •  07-05-2005, 11:56 AM

    Problem while setting the Image Directory programatically

    I am having a problem while setting Image Directory for different Users programatically. It just makes the Cute Editor READONLY. I cannot click on any of the Button Icon. What could be wrong here?

    My Code is 
    If
    "Admin" Then
       
    Editor1.SecurityPolicyFile = "Admin.config"
        Editor2.SecurityPolicyFile = "Admin.config"
    ElseIf "User" Then
        Editor1.SecurityPolicyFile = "Default.config"
        Editor2.SecurityPolicyFile = "Default.config"
     
        Dim MyPath AsString
        MyPath = Server.MapPath("/Uploads/" & UserId & "/")
        SetUploadsFolder(MyPath)
    EndIf
     
    Private
    Sub SetUploadsFolder(ByVal folderString AsString)
        Dim phyfolder AsString
        phyfolder = folderString
        If (System.IO.Directory.Exists(folderString)) Then
            '--Do something here
        Else
           System.IO.Directory.CreateDirectory(folderString)
        EndIf

        Editor1.Setting("security:ImageGalleryPath") = folderString
        Editor1.Setting("security:FlashGalleryPath") = folderString
        Editor1.Setting("security:TemplateGalleryPath") = folderString

       Editor2.Setting("security:ImageGalleryPath") = folderString
       Editor2.Setting("security:FlashGalleryPath") = folderString
       Editor2.Setting("security:TemplateGalleryPath") = folderString


    End
    Sub
    Thanks in advance.
View Complete Thread