大致就是下面这些了
TableRow row = new TableRow();
tblMenu.Rows.Add(row);
if (ExpandWhich == i)
{
row.CssClass = "menu_title";
row.Attributes.Add("onmouseover","this.className='menu_title2'");
row.Attributes.Add("onmouseout","this.className='menu_title'");
cell = new TableCell();
cell.Width = Unit.Percentage(1.0);
cell.Controls.Add(AddImage("Images/minus.gif"));
row.Cells.Add(cell); link = new HyperLink();
link.Text = MenuNodes[currnode++].InnerText;
link.NavigateUrl = "NavBar.aspx?Expand=-1"; cell = new TableCell();
cell.Width = Unit.Percentage(99.0);
cell.Controls.Add(link); row.Cells.Add(cell);
TableRow row = new TableRow();
tblMenu.Rows.Add(row);
if (ExpandWhich == i)
{
row.CssClass = "menu_title";
row.Attributes.Add("onmouseover","this.className='menu_title2'");
row.Attributes.Add("onmouseout","this.className='menu_title'");
cell = new TableCell();
cell.Width = Unit.Percentage(1.0);
cell.Controls.Add(AddImage("Images/minus.gif"));
row.Cells.Add(cell); link = new HyperLink();
link.Text = MenuNodes[currnode++].InnerText;
link.NavigateUrl = "NavBar.aspx?Expand=-1"; cell = new TableCell();
cell.Width = Unit.Percentage(99.0);
cell.Controls.Add(link); row.Cells.Add(cell);
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货