Solved

Treeview Node and querystring variable

Posted on 2006-07-10
2
1,609 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
  • 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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

708 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now