Reference XSLT-file using a project relative way (instead of an absolute path)
Posted
by Binary255
on Stack Overflow
See other posts from Stack Overflow
or by Binary255
Published on 2010-03-16T18:52:24Z
Indexed on
2010/03/16
19:11 UTC
Read the original article
Hit count: 358
The file at xsltFileName is in my project WebSite2 (at the root-level of the project). I currently use an absolute path to get the XSLT file name:
XslCompiledTransform xslt = new XslCompiledTransform();
String xsltFileName = "file:///C:\\Documents and Settings\\kentl\\My Documents\\Visual Studio 2005\\WebSites\\WebSite2\\page.xsl";
xslt.Load(xsltFileName);
I would like to have a solution without an absolute path. What would be the cleanest way?
© Stack Overflow or respective owner