private void LoadTreeView() { try { CMSBL cmsBL = new CMSBL(); DataSet dsTreeView = cmsBL.GetClientTreeview(hdnSiteID.Value); DataTable dtOutline = new DataTable(); DataTable dtTree = new DataTable(); dtOutline = dsTreeView.Tables[0]; dtTree = dsTreeView.Tables[1]; foreach (DataRow drOutline in dtOutline.Rows) { TreeNode node = new TreeNode(drOutline["PAGE_NAME"].ToString()); DataRow[] drChilds = dtTree.Select("PAGE_ID=" + drOutline["PAGE_ID"].ToString(), "CHILD_SORT_PAGE_NUM"); tvContent.Nodes.Add(node); foreach (DataRow drChild in drChilds) { TreeNode childNode = new TreeNode(drChild["PAGE_NAME"].ToString()); node.ChildNodes.Add(childNode); } } } catch (Exception ex) { } }