views:

219

answers:

0

Hi, I have this master page. In that I have kept one treeview. I want, whenever I select any node in the treeview, the node should get highlight and the child page should appear in the right side content place holder. The following code is working fine.

But as I set the navigateurl property of TreeNode control for some other child page, the highlighting is getting stopped. and the TreeView1_SelectedNodeChanged event is also not getting fired.

<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="TheMasterPage.master.cs" Inherits="TreeViewNodeHighlight_webapptest.TheMasterPage" %>

Untitled Page

void Select_Change(Object sender, EventArgs e)
{
    Message.Text = "You selected: " + LinksTreeView.SelectedNode.Text;
}


            <LevelStyles>
                <asp:TreeNodeStyle ChildNodesPadding="10" 
                    Font-Bold="true" 
                    Font-Size="12pt" 
                    ForeColor="DarkGreen"/>
                <asp:TreeNodeStyle ChildNodesPadding="5" 
                    Font-Bold="true" 
                    Font-Size="10pt"/>
            </LevelStyles>

            <Nodes>
                <asp:TreeNode Text="Table of Contents" SelectAction="None">
                    <asp:TreeNode Text="Chapter One">
                    </asp:TreeNode>
                </asp:TreeNode>

                <asp:TreeNode Text="Chapter Two">
                </asp:TreeNode>
            </Nodes>
    </asp:TreeView>
    </td>
    <td>
    <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">
    </asp:ContentPlaceHolder>
    </td>
    </tr>
    </table></div>
</form>

Pls let me know if anybody have the soln: