save file could not find path even after directory creation

  •  09-21-2010, 12:47 PM

    save file could not find path even after directory creation

    Hi guys,
     
    I have dynamically created folders to store a htm file in and it seems the editor does not save the file because it claims it cannot find the path.
     
    I have ran checks with msg boxes to see what it sees and the file path is there and created, but it still does not save the files.
     
    Here is my code:
     
    Dim userFilesString As String = "~\UserFiles\" & Session("UserName").ToString & "\Manuscripts"
    Dim manuscriptPath As String
            Dim chapterPath As String
            Dim versionPath As String
            Dim partialPath As String
     
    manuscriptPath = userFilesString & "\" & manuscriptID.ToString
    chapterPath = "\" & chapterID.ToString
     versionPath = "\" & versionID.ToString & ".htm"
     
    partialPath = ResolveUrl(manuscriptPath & chapterPath)

                    If Not Exists(partialPath) Then
                        CreateDirectory(partialPath)
                    End If
     
                    'this is the test
                    If Exists(partialPath) Then
                        MsgBox(partialPath & " Exists")
                    End If

                    Dim versionFile As String = partialPath & versionPath
                    MsgBox(versionFile)

                    ce_ManuscriptEditor.SaveFile(versionFile)<-- the error occurs here (Could not find a part of the path 'C:\Users\Zephere(JuLian Yong)\Documents\Visual Studio 2008\WebSites\Social Publishing Network\UserFiles\zephere\Manuscripts\3a96632c-e57b-4185-b614-99223b94092d\cbf89742-b0b9-4651-ac8b-24394fa166d6\c75298c8-2ade-4a1e-b608-c0c4936085d7.htm'.)
     
    Someone please help... I have to get this solved urgently
     
View Complete Thread