protected void Page_Load(object sender, EventArgs e) { ReadQueryString(); var tree = new LinkTree(Subject, _subjectType); tree.Populate(_depth, _maxNodes); var r = new TreeNode(tree.Root.Name, tree.Root.Type.ToString(), string.Empty, string.Empty, string.Empty); TreeView1.Nodes.Add(r); AddNodesRecursive(r, tree.Root); }
protected void Page_Load(object sender, EventArgs e) { if (!ReadQueryString()) { return; } var tree = new LinkTree(_subject, _subjectType); tree.Populate(_depth, _maxNodes); Response.ClearContent(); Response.ClearHeaders(); switch (_view) { case "text": Response.ContentType = "text/plain"; tree.ToStringTabSepparatedTable(Response.Output); break; case "xml": Response.ContentType = "text/xml"; tree.ToXml(Response.Output); break; } }