AspdotnetCodes.com
Search
Articles
Books
Resources
Asp.Net News
Downloads
Free Tech Magazines
Asp.Net Web Hosting
Archives
Softwares
Newsletter
Suggest Us
Link to Us
Feeds Subscription
Articles
Questions & Answers
Tips & Tricks
 using repeater in another repeater tag with more than one inputparameter
Posted by saeed jafarian on  8/19/2012 10:22:42 AM Category: Asp.Net 2.0
Add to my favorites
Email to friend
i have a repeater which shows the list of categories ( which i have in database ) , i have another repeater inside this repeater which shows the items related to the category from my db, the category repeater works fine , but this is what i want to do :
category1=>item1_category1, item2_category1, item3_category1 , ....
category2=>item1_category2, item2_category2, item3_category2, ....
........
as i said , there is no problem in category list, but i dont know what should i do for the items list.
in a normal situation if i want to use a sql command i should use " select item from db where category=@category" but in this situation @category changes through the repeater( category repeater)
any idea ?!!!!!!!
thanks in advance

Post Your Reply Post New Question

 Viewer's Reply
DataList Nested with Repeater Control
Answered By Moderator1 on 9/11/2012 9:28:37 AM
Hi,

Instead of trying a nested repeater control, you can try to place a datalist control and inside the DataList, place a html table with 2 columns. 1st column will display the category and the second column, place a Repeater control. This repeater control should display the category items.
 
Post Your Reply If you still have problem, post it again under this reply for better response.

 
Sponsored by
FierceDeveloper
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
Everything You Know About CSS Is Wrong! - Free 37 Page Preview!