Being brand new to ASP.net I am struggling with the transition from classic ASP so please bear with me.
I have a DataList that returns the following:
ID ProductName SubID SubName
1 Test product A NULL NULL
2 Test product B 1 Sub Product i
2 Test product B 2 Sub Product ii
3 Test product C NULL NULL
As you can see, some products have sub products while others do not. I would like to display these records like this:
Test product A
Test product B
Sub Product i
Sub Product ii
Test product C
In ASP I would have used a conditional statement to loop through the recordset determining whether or not to write the Product Name or the Sub Name
How would I accomplish this in .Net 2.0?