protected void treeElem_TreeNodePopulate(object sender, TreeNodeEventArgs e) { e.Node.ChildNodes.Clear(); e.Node.PopulateOnDemand = false; string nodePath = MediaLibraryHelper.EnsurePhysicalPath(e.Node.ValuePath); int rootEnd = nodePath.IndexOfCSafe('\\'); if (rootEnd > -1) { nodePath = nodePath.Substring(rootEnd + 1); } // Bind tree nodes if (String.IsNullOrEmpty(MediaLibraryPath)) { BindTreeView(RootFolderPath + DirectoryHelper.CombinePath(MediaLibraryFolder, nodePath), e.Node); } else { BindTreeView(DirectoryHelper.CombinePath(RootFolderPath, MediaLibraryPath, nodePath), e.Node); } }