/// /// Establish menu function tree /// summary> /// Contains the view of all records of the menu table param> /// Tree node Collection, incoming mytv.nodes, param> /// superior menu ID param> public static void createmenutree (DataView MyDV, TreenodeCollection TNC, String ClassParentID ) {try {DataView dataView = new DataView (); dataView = myDv.Table.Copy () DefaultView;. dataView.RowFilter = "ownerid =" classParentID ""; foreach (DataRowView drv in dataView) {if (UserRight. Getisshow (DRV ["MenuValue"]. TOSTRING (), DRV ["Right"]. ToString (), DRV ["Menuid"]. TREENODE TN = New Treenode (); tn.id = DRV ["Menuid"]. Tnowtring (); tn.text = "" DRV ["MENUNAME "] .Tostring (). Trim () " span> "; tn.imageURL = DRV [" imgurl "]. Tostring (); tn.navigateURL = DRV [" Menuhref "]. Tostring () ==" "?" ": DRV [" Menuhref "]. TOSTRING () "? menuid = " DRV ["Menuid"]. Tnowtring (); tn.target = "mainframe"; TNC.Add (TN); CreateMenutree (MYDV, TN.NODES, TN.ID);}}} catch (Exception EX) {Hansheen.eOffice_ora .Components.error.log ("Get Tree Error:" EX.MESSAGE);}} Call instance: protected Microsoft.Web.ui.WebControls.treeView TVMenu ;. . . . .