Passing parameters to XSLT Stylesheet via .NET
You need to define the parameter within your XSLT and you also need to pass the XsltArgumentList as an argument to the Transform call: private static void CreateHierarchy(string manID) { string man_ID = manID; XsltArgumentList argsList = new XsltArgumentList(); argsList.AddParam(“Boss_ID”, “”, man_ID); XslCompiledTransform transform = new XslCompiledTransform(true); transform.Load(“htransform.xslt”); using (StreamWriter sw = new StreamWriter(“output.xml”)) { … Read more