I am working with C# code on an ASP.NET Page, and am having trouble with my DataTables. I have populated two tables from sprocs in my Database - the first one looks like this:
Table1:
ID Name
id1 category1
id2 category2
my second table has multiple rows, but the relevant ones are:
Table2:
Name ID ParentID
row1 id4 id1
row2 id5 id1
row3 id6 id2
I want to display a table that will look something like this (pseudocode):
foreach (t1row in Table1)
{display t1row[name]
foreach (t2row in Table2)
{ if (t2row[parentID] = t1row[id])
{display t2row[all columns]}
}
}
I have been trying to add or import these rows into a Display Table, or View, or even dataset, and it is not working. Any suggestions?
Thank you!
--student intern