Stepyogameup
Programmer
- Nov 4, 2008
- 3
I have to loop a datatable and from the datatable I want to dynamically declare AccordionPane. I tried to do it like this code but it doesn't work. Anyone knows how I declare AccordionPane dynamically.
How can I solve this problem.
Code:
private void CreateWebMenu()
{
string mainMenu = string.Empty;
int i = i++;
foreach (DataRow dr in mDataTable.Rows)
{
[COLOR=red]AccordionPane accPane + i = new AccordionPane();[/color]
if (mainMenu != dr["DialogName"])
{
}
mainMenu = dr["DialogName"];
}
}
How can I solve this problem.