开发者

NavigateUrl is not working with SelectedNodeStyle

I'm trying to get SelectedNodeStyle to work with NavigateUrl without success. The style is not applied when clicking on nodes.

            <asp:TreeView ID="treeviewSIP" runat="server" ExpandDepth="0">
                <SelectedNodeStyle BackColor="Red" ForeColor="WhiteSmoke" 
                    BorderStyle="Solid" BorderWidth="1px" BorderColor="#66FF33">
                开发者_运维问答</SelectedNodeStyle>
            </asp:TreeView>

Node creation:

                With nyNode
                    .NavigateUrl = "thePage.aspx?op=visa&Tabell_ID=" + viewSIP.Item(sipIndex)("TABELL_ID").ToString
                    .Target = "main"
                    .Text = viewSIP.Item(sipIndex)("NAMN")
                    .SelectAction = TreeNodeSelectAction.Select
                    theParent.ChildNodes.Add(nyNode)
                End With

Any suggestions?


Did a workaround. Used TreeNode.Value instead of TreeNode.NavigateUrl and used the TreeView.SelectedItemChanged event to do the actual navigation.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜