Logo 
Search:

MOSS Forum

Ask Question   UnAnswered
Home » Forum » MOSS       RSS Feeds

Resolving file paths from a second site collection

  Asked By: Peter    Date: Dec 20    Category: MOSS    Views: 7444

Hi All,

I'm relatively new to Sharepoint 2007 but I inherited some code that I need to adapt to a new site collection.

The code fills in a navigation line at the top of the page. It requires an xslt page that goes out and reads an xml file.

The offending code is:
XDocument xsl = XDocument.Parse(SPContext.Current.Web.GetFileAsString("/Style%20Library/XSL/topnavigation.xslt"));

The error at the second site collection is that the file is not found. I attribute this to the relative placement of the file in regards to the site collection. If I was on the html side I would use $SPUrl:~sitecollection but I am not sure what to do in the code section.

I may be wrong on the cause but I'm not sure how to verify.

Thanks in advance,

Pete Apostle

Share: 

 

No Answers Found. Be the First, To Post Answer.

 
Didn't find what you were looking for? Find more on Resolving file paths from a second site collection Or get search suggestion and latest updates.




Tagged: