1
我加载以下用C#的SharePoint的WebPart代码XSLT文件:XML文档的WebPart代码隐藏
string path = context.Request.MapPath("/_layouts/RSSWeatherXSL.xsl");
XslTransform trans = new XslTransform();
trans.Load(path); // loading xsl file
XSLT文件是相当大的周围134线。
我需要在XSLT中引用由代码隐藏生成的路径中的图像。
SPWeb currentWeb = SPControl.GetContextWeb(Context);
2.Type currentType = this.GetType();
3.string classResourcePath = SPWebPartManager.GetClassResourcePath(currentWeb, currentType);
我该怎么做? 谢谢,
如果您没有使用.NET 1.0或1.1,则应使用XslCompiledTransform http://msdn.microsoft.com/en-us/library/system.xml.xsl.xslcompiledtransform.aspx而不是XslTransform。 – Filburt 2010-01-12 11:53:50