vhrao

vhrao

  • NA
  • 1
  • 0

asp.net treeview within a frame does nto respond to SelectedNodeChanged or page_load event

Feb 17 2006 5:21 PM
 have a base.aspx with a frameset
<frameset cols="30%, 75%">
<frame name="Menu" src="TView.aspx"/>
<frame name="Content" src="right.aspx"/>
</frameset>
I have a masterpageL.master that has a content place holder for treeview
<asp:contentplaceholder id="TView" runat="server" >
Treeview</asp:contentplaceholder></td>

The TView.aspx corresponds to the above masterpageL.master and defines the TreeView

<asp:Content ID="Content2" ContentPlaceHolderID="TView" Runat="Server">
<asp:TreeView id="TreeView1" runat="server" ImageSet="Simple" OnSelectedNodeChanged="TreeView1_SelectedNodeChanged" >
<Nodes>

….

</Nodes>
</asp:TreeView>

TView.aspx.cs Code behind file defines the event handler:
protected void TreeView1_SelectedNodeChanged(object sender, EventArgs e)
{
Session["tvNode"] = TreeView1.SelectedNode.Text;
}
The TreeView displays properly. When I select a treeview node it never hits the above TreeView1_SelectedNodeChanged event handler .

Also, when I select the treeview node, even the page_load does not get called.

Can someone help?