I have a class in which there is a print method to print the output.the code is given below.
public class class1
{
public void printNode(TreeNode root, string tabs)
{
string rootnode;
string childnodes;
rootnode = tabs + "| " + root.attribute + "|" + ":";
StringBuilder sb = new StringBuilder();
if (root.attribute.values != null)
{
for (int i = 0; i < root.attribute.values.Length; i++)
{
sb.Append(tabs + "\t" + "<" + root.attribute.values[i] + ">");
// Console.Write(tabs + "\t" + "<" + root.attribute.values[i] + ">");
TreeNode childNode = root.getChildByBranchName(root.attribute.values[i]);
printNode(childNode, "\t" + tabs);
}
}
childnodes = sb.ToString();
}
}
I called this method in a web page like this;
class1 cls =new class1();
cls.printNode(root,"");
but problem is that output is not getting displayed.
Instead of using rootnode and childnodes as string, is there any other way to display the text and then call to the web page.
please help me...Its urgent...I am behind on this for so many days...please...