Data Binding ASP.Net Tutorial

File: ShowSeparatorTemplate.aspx
<%@ Page Language="C#" %>
   "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">


    
    html
    {
        background-color:silver;
    }
    .content
    {
        width:600px;
        height:400px;
        padding:10px;
        border:solid 1px black;
        background-color:white;
    }
    a
    {
        color:blue;
    }
    
    Show SeparatorTemplate


    
    
            id="rptProductCategories"
        DataSourceID="srcProductCategories"
        Runat="server">
        
                    id="lnkMenu"
            Text='<%#Eval("Name")%>'
            NavigateUrl='<%#Eval("Id","ShowSeparatorTemplate.aspx?id={0} ")%>'
            Runat="server" />
        

        
         | 
        

    
            id="rptProducts"
        DataSourceID="srcProducts"
        Runat="server">
        
        

            
            
            
  • <%#Eval("Title")%>

  •         

            
            

        
    
            id="srcProductCategories"
        ConnectionString="<%$ ConnectionStrings:Products %>"
        SelectCommand="SELECT Id, Name
            FROM ProductCategories"
        Runat="server" />
            id="srcProducts"
        ConnectionString="<%$ ConnectionStrings:Products %>"
        SelectCommand="SELECT Title FROM Products
            WHERE CategoryId=@CategoryId"
        Runat="server">
        
                    Name="CategoryId"
            QueryStringField="Id" />