A simple way, working:
public static string NodetoHTMLstring(string id , int level, string text )
{
string str = "
";
for(int i=0 ; i {
str += "__";
}
str += text + "
";
return str;
}
and how i call it
string s = "";
foreach(TreeNode tn in FlyTreeView1.GetCheckedNodes())
{
s += NodetoHTMLstring( tn.Key , Convert.ToInt32(tn.Data) , tn.Text );
}