/usr/share/asp.net-demos/2.0/treeview/populate.cs is in asp.net-examples 4.2-2.1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | using System;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
public class Populate: Page
{
public void TreeView1_TreeNodePopulate(object sender, TreeNodeEventArgs e)
{
if (e.Node.Depth > 4)
return;
for (int n = 0; n < (e.Node.Depth+1) * 2; n++)
{
string label = string.Empty;
if (e.Node.Depth < 1)
label = "Node";
else
label = e.Node.Text;
if (Char.IsDigit(label.ToCharArray()[label.Length-1])) {
label += " " + (char)(n + 65);
} else {
label += " " + n;
}
TreeNode nod = new TreeNode(label);
//TreeNode nod = new TreeNode("Node " + e.Node.Depth + " " + n);
nod.PopulateOnDemand = true;
e.Node.ChildNodes.Add(nod);
}
}
}
|