简体   繁体   中英

ASP VB.NET Repeater in Repeater?

I have the following SQL Tables.

tCategory

idCategory | catName

tLink

idLink | Url | FK_Category

On my ASP.NET site I want to do this:

CategoryOne

  • www.google.com
  • www.wikipedia.com

CategoryTwo

  • www.stackoverflow.com
  • www.myawesomewebsite.com

CategoryThree

  • www.wordlwideweb.com

How can I do this dynamically. I'm thinking of two repeaters.

Short answer, but yes - two nested repeaters looks like a good solution. In a webforms project, it is what I would do.

Just fetch your data, bind it to the first repeater and use linq to extract the data for the inner repeater.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM