Solved

Treeview Node and querystring variable

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Lots of people ask this question on how to extend the “MembershipProvider” to make use of custom authentication like using existing database or make use of some other way of authentication. Many blogs show you how to extend the membership provider c…
ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

929 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

10 Experts available now in Live!

Get 1:1 Help Now