protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
bind_treeMenu();
}
}
private void bind_treeMenu()
{
treeMenu.Nodes.Clear();
DataTable dtMenus = sysMenu.GetParentMenu("").Tables[0];
FineUI.TreeNode uitree = new FineUI.TreeNode();
if (dtMenus.Rows.Count!=0)
{
for (int i = 0; i < dtMenus.Rows.Count; i++)
{
if (i>0)
{
uitree = new FineUI.TreeNode();
uitree.Text = dtMenus.Rows[i]["MENU_NAME"].ToString();
string p_no = dtMenus.Rows[i]["MENU_ID"].ToString();
treeMenu.Nodes.Add(uitree);
get_tree_node(p_no, uitree);
}
}
}
}
private void get_tree_node(string parentID, FineUI.TreeNode node) {
DataTable dt = sysMenu.GetParentMenu(parentID).Tables[0];
for (int i = 0; i < dt.Rows.Count; i++)
{
string pid = dt.Rows[i]["MENU_ID"].ToString();
string name = dt.Rows[i]["MENU_NAME"].ToString();
FineUI.TreeNode tnode = new FineUI.TreeNode();
tnode.NavigateUrl=dt.Rows[i]["NAVIGA_URL"].ToString();
tnode.Target = "main";
tnode.Text = name;
tnode.OnClientClick = mainTabStrip.GetAddTabReference("tabMenuManger", tnode.NavigateUrl, name, true);
node.Nodes.Add(tnode);
get_tree_node(pid, node);
}
}
每次选项卡只能弹出一个页面 怎么解决这个问题 |