Solved

Treeview Node and querystring variable

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Save ms data to server side. 19 58
Adding items to a C# list incrementally 5 58
asp.net uploading picture to a temporary folder 4 25
asp.net mvc 2 32
A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

679 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