XML ASP.Net

<%@ Page Language="C#" %>
<%@ Import Namespace="System.Xml" %>
<%@ Import Namespace="System.Xml.Xsl" %>
<%@ Import Namespace="System.Xml.XPath" %>
                
    void Page_Load(object sender, System.EventArgs e)
  {
        string xmlPath = MapPath("BooksWithStyle.xml");
        string xslPath = MapPath("Books_with_script.xsl");      
        XPathDocument xpathDoc = new XPathDocument(xmlPath);      
        XsltSettings settings = new XsltSettings(false, true);
        XslCompiledTransform transform = new XslCompiledTransform();                    
        transform.Load(xslPath, settings, null);                
        transform.Transform(xpathDoc, null, Response.Output);            
    }        

<%-- BooksWithStyle.xml


  
    title 1
    
      A
      B
    

    99.99
  
  
    title 2
    
      B
      C
    

    11.99
  

--%>
<%-- Books_with_script.xsl


  
    // add cdData tag here
      public string ReturnDiscount(string price)
      {    
        decimal priceValue = Convert.ToDecimal(price);
        return (priceValue * 15/100).ToString();
      }
    
  
  
  
    
      XSL Transformation
      
        

My Book Collection


        
          
            Title
            Price
            Calculated Discount
          
          
            
              
                
              
              
                
              
              
                
              
            
          
        
      
    
  

--%>