Solved

Treeview Node and querystring variable

Posted on 2006-07-10
2
1,627 Views
Last Modified: 2008-01-09
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>
0
Comment
Question by:Gezna
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 7

Expert Comment

by:irps20001
ID: 17079391
You can set the Navigate URL from Code behind. Try it out

HTH
0
 
LVL 7

Accepted Solution

by:
irps20001 earned 500 total points
ID: 17079720
This is just an example to give an idea.
[CODE]
Dim strLang As String = "English"
        For Each nd As TreeNode In Me.infTreeView.Nodes
            nd.NavigateUrl = "Project.aspx?lang=" & strLang
        Next
[/CODE]

0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question