I have an asp treeview control.. i have populated it with data
Its structure is as follows:
Parent node A
Child node B1
Child node C1
Child node C2
Child node C3
Child node B2
Child node C4
Child node C5
Child node C6
:
:
:
i.e Depth = 2
Now when i select i.e click on any of the child nodes of last level i.e C1,C2,C3,C4,C5 or C6...the TreeView1_SelectedNodeChanged event is raised
and TreeView1.SelectedNode.Text always shows the text of C1 node
which is not the case with Parent node A or Child node B1 or Child node B2
No probs while populating the treeview....only it retrives the same text everytime eventhough selecting diff child node of last sub-level
Need to fetch a text of a selected treeview node
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Hirendra SisodiyaRank #258 · 9.8K reputationPosted Apr 20, 2010, 9:50 PM EDT
Hello Nishil
i think, you can try another event 'AfterSelect'.
thanks
Please mark as answere if it helps
Rujuta133 reputationPosted Apr 20, 2010, 10:40 PM EDT
try this,
add your code of binding the treeview in
if(!IsPostBack)
{}
hope it helps....