Retrieving XSL as a string in MOSS 2007

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")
Bookmark and Share
Leave a comment

0 Comments.

Leave a Reply


[ Ctrl + Enter ]

Performance Optimization WordPress Plugins by W3 EDGE