ASPX CODE:
<asp:Repeater ID="categoryRepeater" runat="server">
<HeaderTemplate><dl></HeaderTemplate>
<ItemTemplate>
<dt><em><%# Eval("Key") %></em></dt>
<dd>
<asp:Repeater ID="nestedRepeater" runat="server"
DataSource='<%# Eval("Value") %>' >
<HeaderTemplate><ol></HeaderTemplate>
<ItemTemplate>
<li>
<asp:Label ID="lblSubCategory"
runat="server"
Text='<%# Eval("Key") %>' />
<asp:TextBox ID="txtInformation"
runat="server"
Text='<%# Eval("Value") %>' />
</li>
</ItemTemplate>
<FooterTemplate></ol></FooterTemplate>
</asp:Repeater>
</dd>
</ItemTemplate>
<FooterTemplate></dl></FooterTemplate>
</asp:Repeater>
Codebehind (Init Arrays and DataBind) :
ArrayList categories = new ArrayList
{ "Category", "Category 2",
"Category 3", "Category 4" };
ArrayList subCategories = new ArrayList
{ "SubCategory 1", "SubCategory 2",
"SubCategory 3", "SubCategory 4" };
ArrayList textControlNames = new ArrayList
{ "Enter 1", "Enter 2", "Enter 3", "Enter 4" };
Dictionary<string, Dictionary<string, string>> combined =
new Dictionary<string, Dictionary<string, string>>();
for (int i = 0; i < categories.Count; i++)
{
Dictionary<string, string> inner = new Dictionary<string, string>();
for (int j = 0; j < subCategories.Count;j++)
{
inner.Add(subCategories[j].ToString(),
textControlNames[j].ToString());
}
combined.Add(categories[i].ToString(), inner);
}
categoryRepeater.DataSource = combined;
categoryRepeater.DataBind();