I am new to using VB and .NET together so please let me know if there is a better way to do this.
Currently in my database I have a table of Categories. I also have a table of Products. Each product in the Products table belongs to a category in the table Categories.
Right now I am displaying all my Categories using an asp: DataList object. What I need to do next is for each of those categories displayed, I want to display all the products in that category, probably in an asp:Listbox.
The problem I am having is I am unsure how to display another query inside the DataList based on the current category that it is being displayed. This way I can display all the products associated with each category that the DataList goes through. Can I put some other interface inside the DataList and ItemTemplate that will help me with this?
I know if I do an Eval("<column_name>") I can get the current category that is being displayed but I am not sure how I can put this into another SQL query and bind it to a list box inside that DataList.
What would be the best interface to use or maybe someone even could point me towards a tutorial that can help me with this problem?
Currently in my database I have a table of Categories. I also have a table of Products. Each product in the Products table belongs to a category in the table Categories.
Right now I am displaying all my Categories using an asp: DataList object. What I need to do next is for each of those categories displayed, I want to display all the products in that category, probably in an asp:Listbox.
The problem I am having is I am unsure how to display another query inside the DataList based on the current category that it is being displayed. This way I can display all the products associated with each category that the DataList goes through. Can I put some other interface inside the DataList and ItemTemplate that will help me with this?
I know if I do an Eval("<column_name>") I can get the current category that is being displayed but I am not sure how I can put this into another SQL query and bind it to a list box inside that DataList.
What would be the best interface to use or maybe someone even could point me towards a tutorial that can help me with this problem?