Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


How to Create a Treeview Menu in ASP.NET with C#?



How to Create a Treeview Menu in ASP.NET with C#?..

Answer / guest

Microsoft.Web.UI.WebControls.TreeView Treeview11

public void PopulateTree()
{
TreeNode nodeProdDetail, nodeProdMaster;
nodeProdMaster = new TreeNode();
nodeProdMaster.Text = "Master1";
nodeProdMaster.ID = "1";

nodeProdDetail = new TreeNode();
nodeProdDetail.Text = "Detail1";
nodeProdDetail.ID = "1.1";
nodeProdDetail.NavigateUrl = "SomePage.aspx";
nodeProdMaster.Nodes.Add(nodeProdDetail);

Treeview1.Nodes.Add(nodeProdMaster);

nodeProdMaster = new TreeNode();
nodeProdMaster.Text = "Master2";
nodeProdMaster.ID = "2";

nodeProdDetail = new TreeNode();
nodeProdDetail.Text = "Detail2";
nodeProdDetail.ID = "2.1";
nodeProdDetail.NavigateUrl = "SomeOtherPage.aspx";
nodeProdMaster.Nodes.Add(nodeProdDetail);

Treeview1.Nodes.Add(nodeProdMaster);
}

Is This Answer Correct ?    25 Yes 22 No

Post New Answer

More C Sharp Code Interview Questions

how can i split sting in textbox in windows application using c# .net

2 Answers  


. Write a program to print the following outputs using for loops $ $ $ $ $ $ $ $ $ $ $ $ $ $ $

3 Answers  


Write a program. there are 1..n numbers placed in an array in random fashion with one integer missing. find the missing number.

1 Answers   Infosys, Mind Tree,


Can you declare an array of mixed Types?

1 Answers   HCL,


How to Create Files by Using the FileInfo Class?

1 Answers  


c# coding for a program that takes a 3 digit number n and finds out whether the number 2^n + 1 is prime, or if it is not prime find out its factors not using the Big-integer and Exponential Function's.

1 Answers   TCS,


Code for Working with Files under a Directory?

1 Answers  


working with arrays

1 Answers  


Write a program which has a function and that function should take 2 or 3 or any number of strings and it should return the largest common prefix of all those strings. If there is no common prefix it should return an empty string. for eg:- INPUT OUTPUT glo {glory,glorious,glod} gl {glad,glow} {calendar,phone} empty string

2 Answers   Mind Tree,


How to find No of classes,Packages,No of Methods per Classes and Depth of Inheritance for selecting source code in windows form application using c# .net? (Source code is input Program. It may be Java or .net) Please help me..) Thanks..)

0 Answers  


Code for IP Address Comparison and Conversion in C#?

0 Answers  


"c sharp" code for factorial using static variables

9 Answers  


Categories
  • ASP.NET Code Interview Questions ASP.NET Code (46)
  • VB.NET Code Interview Questions VB.NET Code (9)
  • C Sharp Code Interview Questions C Sharp Code (51)
  • ADO.NET Code Interview Questions ADO.NET Code (8)