Posted on: 11/24/2012 12:31:34 AM | Views : 485

Hello
I like to use below code and functions that found in the net in the page_load of new asp.net page, so I made required table (Topic) in database and dbml but I have problem for how calling function in ASP.NET?
static TreeNode GenerateTopicsTree(IEnumerable<Topic> topics) { // shouldn't the root value be null? var root = new TreeNode("Topics", null); return GenerateTopicSubTree(root, topics); } static TreeNode GenerateTopicSubTree(TreeNode root, IEnumerable<Topic> topics) { // partition the topics to child and non-child topics var rootId = GetId(root); var childTopics = topics.ToLookup(topic => topic.ParentId == rootId); // create and add subtrees to t ...

Go to the complete details ...