for (int d = 0; d <= count;d++)
{
// MenuItem masterItem = new MenuItem(d.ToString());
//// masterItem.NavigateUrl = mainRow["mainUrl"].ToString();
// Menu1.Items.Add(masterItem);
if (d < count)
{
Menu1.Items.Add(new MenuItem("Text", "Value"));
}
}
Go to the complete details ...