是否缺少 using 指令或程序集引用??------------
肯定是缺少引用,查查错误吧

解决方案 »

  1.   

    或者你可以在后台写一个事件用<%=%>来调用
      

  2.   

    验证 (): 元素“html”出现的次数太少。
    为什么这里不能发图片了,郁闷!
      

  3.   

    <%@ Page Language="C#" %>
    <%@ Import Namespace="System.Xml" %>
    <%@ Import Namespace="System.Xml.Xsl" %>
    <%@ Import Namespace="System.Xml.XPath" %><script runat="server">                
        void Page_Load(object sender, System.EventArgs e)
    {
            string xmlPath = Request.PhysicalApplicationPath + @"\App_Data\Books.xml";
            string xslPath = Request.PhysicalApplicationPath + @"\App_Data\Books.xsl";     
        XPathDocument xpathDoc = new XPathDocument(xmlPath);     
            XslCompiledTransform transform = new XslCompiledTransform();                    
            //Load the XSL stylsheet into the XslCompiledTransform object
            transform.Load(xslPath);                
            transform.Transform(xpathDoc, null, Response.Output);            
        }        
    </script>//它这个地方指着说有错
      

  4.   

    拜托,你这个怎么是前台调用后台方法?
    你这个是后台方法和前台文件写在一起而已!!!-------------------------------------
    他把void写在了<script>里.....暴汗ing
      

  5.   

    void Page_Load(object sender, System.EventArgs e)
    ---------------
    晕菜!
      

  6.   

    验证 (): 元素“html”出现的次数太少。 ----------------------
     我说怎么看着这行有点眼熟呢!原来这是在.aspx文件里的东西
      

  7.   

    贴子回复次数大于跟给分次数  ,什么意思,顺便说下这个程序本身没有问题,是ASP.NET 2.0 XML 高级编程(第3版)这本书里面的代码,并非大家所说的问题