This is a migrated thread and some comments may be shown as answers.

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

6 Answers 122 Views
Sharepoint Integration
This is a migrated thread and some comments may be shown as answers.
Bob
Top achievements
Rank 1
Bob asked on 25 Jul 2008, 01:26 PM


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'.

6 Answers, 1 is accepted

Sort by
0
Veselin Vasilev
Telerik team
answered on 25 Jul 2008, 01:55 PM
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.
0
Bob
Top achievements
Rank 1
answered on 25 Jul 2008, 03:05 PM
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
0
Veselin Vasilev
Telerik team
answered on 28 Jul 2008, 10:48 AM
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.
0
Bob
Top achievements
Rank 1
answered on 30 Jul 2008, 03:19 PM
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.
0
Accepted
Veselin Vasilev
Telerik team
answered on 30 Jul 2008, 03:43 PM
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.
0
Bob
Top achievements
Rank 1
answered on 30 Jul 2008, 07:48 PM
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!
Tags
Sharepoint Integration
Asked by
Bob
Top achievements
Rank 1
Answers by
Veselin Vasilev
Telerik team
Bob
Top achievements
Rank 1
Share this question
or