Click here to Skip to main content
15,889,867 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i created treeview in asp.net and c#. it works fine. but when you click + the following method will call

C#
protected void TreeView1_TreeNodePopulate(object sender, System.Web.UI.WebControls.TreeNodeEventArgs e)
{
   PopulateSubLevel(Convert.ToInt32(e.Node.Value), e.Node);

}

but i need while click on node (ie after +) for example : +football.

here i will have id for football. right. so i need to capture that node value when clicking on football. so that i can call populatesublevel method. becuasue once clicked on football, it has to show on right side it's images as well as i need to expand it's tree on left side.

please hel
Posted
Updated 18-Oct-13 4:21am
v2
Comments
ZurdoDev 18-Oct-13 9:57am    
This is not clear. Why does e.Node.Value not give you what you need?

1 solution

C#
protected void YourTreeView_SelectedNodeChanged(object sender, EventArgs e)
        {
            txtname.Text = TVMenu.SelectedValue.ToString();
        }


this will give you the value of selected item
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900