void LoadTreeChildren(string ParentWebID, string TreeClientID) { string childrenHTML = ""; Initialize(); foreach (SPSite treeRootSite in this.treeRootSites) { try { SPWeb parentWeb = treeRootSite.OpenWeb(new Guid(ParentWebID)); if (parentWeb.Exists) { foreach (SPWeb sub in parentWeb.GetSubwebsForCurrentUser()) { BuildTree(null, sub, this.ExpandLevels); } break; } } catch { } } childrenHTML = theTreeControl.GetChildrenHTML(TreeClientID); Page.Response.Clear(); Page.Response.Write(childrenHTML); Page.Response.End(); }