Data Binding ASP.Net Tutorial

<%@ Page Language="C#"%>



    Untitled Page


    
    

         

Nested data bind sample


                               DataSourceID="_bookstoreDataSource">
          
            Title: <%# Eval("Title") %>
                             DataSource='<%# XPathSelect("chapter") %>'>
              
                

Chapternum: <%# XPath("@num") %>


                

Chapter name: <%# XPath("@name") %>


                <%# XPath(".") %>
                
              

            
            
          

        
                                   runat="server" DataFile="~/App_Data/Data.xml"
                           XPath="/Data/genre/book" />
            
                
    

    


File: Data.xml

  
    
      
        Abstract...
      
      
        Abstract...
      
      
        Abstract...
      
    
    
      
        Abstract...
      
      
        Abstract...
      
      
        Abstract...
      
    
    
      
        Abstract...
      
      
        Abstract...
      
      
        Abstract...