Link to home
Start Free TrialLog in
Avatar of Gezna
Gezna

asked on

Treeview Node and querystring variable

Hi,

I have a treeview node (.net 2.0) that has a NavigateUrl="~/Project.aspx" . How do I say that I want to append a querystring variable of a public variable from the code behind named lang?

I thought it would be something like NavigateUrl='~/Project.aspx?<%#strLang%>' but this doesn't work.

Thanks

<asp:TreeView ID="infTreeView" runat="server"
                        ImageSet="Simple">
                        <ParentNodeStyle Font-Bold="False" />
                        <HoverNodeStyle Font-Underline="True" ForeColor="#5D7B9D" />
                        <SelectedNodeStyle Font-Underline="True" ForeColor="#5555DD" HorizontalPadding="0px"
                            VerticalPadding="0px" />
                        <NodeStyle Font-Names="Tahoma" Font-Size="10pt" ForeColor="Black" HorizontalPadding="0px"
                           cssclass="BellowMenuBanner" NodeSpacing="0px" VerticalPadding="0px" />
                        <Nodes>
                                                 <asp:TreeNode NavigateUrl="~/Project.aspx" Text="Project" Value="Project" >    </asp:TreeNode>
                            <asp:TreeNode NavigateUrl="~/Reports/Reports.aspx" Text="Reports" Value="Reports"></asp:TreeNode>
                            <asp:TreeNode NavigateUrl="~/Maintenance/UserMaintenance.aspx" Text="User Maintenance" Value="User Maintenance"></asp:TreeNode>
                        </Nodes>
                    </asp:TreeView>
Avatar of irps20001
irps20001
Flag of India image

You can set the Navigate URL from Code behind. Try it out

HTH
ASKER CERTIFIED SOLUTION
Avatar of irps20001
irps20001
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial