mylifeinaminute.com

Retrieving XSL as a string in MOSS 2007

by liquidpooled on Jul.07, 2008, under Microsoft, Office, Sharepoint Server, Visual Studio 2005, Visual Studio 2008, Windows SharePoint Services

There are times as a SharePoint developer when you may want to access some of the built in XSL style sheets that are included with a base publishing installation, such as “TableOfContentsMain.xsl”. To gain access to the string data contained in the XSL style sheet, you can use the following method:


SPContext.GetContext(HttpContext.Current).Web.Site.RootWeb.GetFileAsString("/Style Library/XSL Style Sheets/TableOfContentsMain.xsl")
No comments for this entry yet...

Leave a Reply

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...