.LoadContentFile("~Layouts/MJTree/TreeData.xml") --> Could not find part of the path

7 posts, 1 answers
  1. Bob
    Bob avatar
    55 posts
    Member since:
    Apr 2008

    Posted 25 Jul 2008 Link to this post



    m_RadTreeFolderHierarchy.LoadContentFile("~Layouts/MJTree/TreeData.xml")

    Results in:

    Could not find a part of the path 'C:\Inetpub\wwwroot\wss\VirtualDirectories\80\ISD\~Layouts\MJTree\TreeData.xml'.
  2. Veselin Vasilev
    Admin
    Veselin Vasilev avatar
    2992 posts

    Posted 25 Jul 2008 Link to this post

    Hi Bob,

    Is this: ~Layouts a real name of the folder or you have forgotten to put the slash character like:
    m_RadTreeFolderHierarchy.LoadContentFile("~/Layouts/MJTree/TreeData.xml")


    Sincerely yours,
    Veskoni
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.

  3. Bob
    Bob avatar
    55 posts
    Member since:
    Apr 2008

    Posted 25 Jul 2008 Link to this post

    I want to pull images from here:

    C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS\Images

    But using the syntax, it tries to pull from here:
    C:\Inetpub\wwwroot\wss\VirtualDirectories\80\Layouts\Images
  4. Veselin Vasilev
    Admin
    Veselin Vasilev avatar
    2992 posts

    Posted 28 Jul 2008 Link to this post

    Hello Bob,

    Have you tried using the Server.MapPath ?
    You can also try using the full path like:

    m_RadTreeFolderHierarchy.LoadContentFile(@"C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS\\MJTree\TreeData.xml")

    I guess you meant the xml file, not the images in your last post?

    Kind regards,
    Veskoni
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  5. Bob
    Bob avatar
    55 posts
    Member since:
    Apr 2008

    Posted 30 Jul 2008 Link to this post

    Using vb.net, the @ is showing as an invalid character.  If I remove it, it compiles, but...

    Now it says:

    "C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS\\MJTree\TreeData.xml" is not a valid virtual path.
  6. Answer
    Veselin Vasilev
    Admin
    Veselin Vasilev avatar
    2992 posts

    Posted 30 Jul 2008 Link to this post

    Hi Bob,

    As far as I understand:

    1. Your project files are located here: C:\Inetpub\wwwroot\wss\VirtualDirectories\80
    2. The content xml file for the treeview is here:
    C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS\\MJTree\TreeData.xml

    If this is true, you need to do the following:

    1. In IIS, under your application create a virtual folder that points to

    C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS\\MJTree
    Let's call it: Layouts

    2. Call the LoadContentFile method:

    RadTreeView1.LoadContentFile("~/Layouts/TreeData.xml");


    I hope this helps.

    All the best,
    Veskoni
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  7. Bob
    Bob avatar
    55 posts
    Member since:
    Apr 2008

    Posted 30 Jul 2008 Link to this post

    That did the trick.  Also, I was able to copy the images to the site collection image folder, and use the url as the imageurl.

    Thank you!
Back to Top