for
(int i = 0; i < Menu1.Items.Count; i++){
if (Menu1.Items[i].Selected){
TreeView1.Nodes[i].Expand();
for (int j = 0; j < i; j++){
TreeView1.Nodes[j].Collapse();
}
for (int k = TreeView1.Nodes.Count - 1; k > i; k--){
TreeView1.Nodes[k].Collapse();
}
}
}
Hi if i click on the menu item the same item(with same name) in the treeview will be expanded and the other items will be collapsed this is working fine
but if i give the navigatr url to menu item it's not working
plss i want the code such that if i click on menuitem it should go to the corresponding page and the corresponding treeview itme should be expanded.

Answers
Know the answer? Post it. Somebody with the same question will find it here.