Exemple #1
0
        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;
            }
        }