Nested use of Repeater in Repeater

Source: Internet
Author: User

In a general website, user controls of browsing categories are usually located on the left of most ASP. NET pages, which enables users to quickly search for products by category. Recently, I met a customer who asked to add products based on the original category browsing because there are not many products displayed on his website. In addition, the length of the left navigation bar is extended to make the page more harmonious. The original category navigation bar is implemented by Repeater. Now we need to add the product information of this category under each category, so I thought of embedding Repeater in the original Repeater. The implementation interface is as follows:


Front-end page:
<Asp: RepeaterId= "RptCategories"Runat= "Server">
<HeaderTemplate>
<TableWidth= "100%"Border= "0"Cellspacing= "0"Cellpadding= "0">
</HeaderTemplate>
<ItemTemplate>
<! --Category name-->
<Tr> <Th><%# DataBinder.Eval(Container. DataItem,"TypeName")%></Th> </Tr>
<! --Products under category-->
<Asp: RepeaterId= "RptProduct"Runat= "Server">
<ItemTemplate>
<Tr> <Td> <AHref= ProductInfo. aspx? Id = <% #DataBinder. Eval (Container. DataItem, "ID") %>><%

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.