Loosing the folderpath: Could not find a part of the path

Last post 07-11-2006, 5:31 AM by Codescribler. 3 replies.
Sort Posts: Previous Next
  •  05-14-2006, 1:02 PM 19120

    Loosing the folderpath: Could not find a part of the path

    Hi All,
     
    N.B: Am using Visual Web Developer
     
    I have just installed the DotNetGallery and parts of it work realy well. I can load the gallery, upload pictures. If I try to view a picture by clicking on the thumbnail I get the following error:
     
    Could not find a part of the path 'C:\Documents and Settings\DREAMFREE\My Documents\Visual Studio 2005\WebSites\WebXPro\Site\Admin\ImageGallery\samplefolder\gallery.xml'.
     
    Now the problem is that when I load the page I set the folderpath property to the correct path so why is it looking for 'samplefolder\gallery.xml'? Shouldn't it be using the folderpath I gave it?
     
    A quick anwer would be great as I have a demo of the site and this feature would be great to include. The demo is on monday the 15th of May 2006 (tommorro).
     
    Danny
  •  05-14-2006, 1:13 PM 19123 in reply to 19120

    Solved!

    Hi All,
     
    I had top take the code that set the folderpath out of the 'not page.ispostback' if statement and ensure it is set every time.
     
    If you need code samples let me know.
     
    Danny
  •  07-10-2006, 4:51 PM 20869 in reply to 19123

    Re: Solved!

    Could you post this code....I am getting the same error.
    Thanks,
    Aberon44
  •  07-11-2006, 5:31 AM 20887 in reply to 20869

    Re: Solved!

    Hi Aberon44,
     
    I have pasted my page_load code here for you to see. The key thing to note is that gallery1.FolderPath is set outside the 'if not Page.IsPostBack'. Hope it helps!

    Protected
    Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

    If Not Page.IsPostBack Then

     

    End If

    Dim album As String = Request.QueryString("album")

    If album Is Nothing Or album = "/" Then

    gallery1.FolderPath = "~/Site/Images/"

    Else

    gallery1.FolderPath = album

    End If

    End Sub

View as RSS news feed in XML