473,385 Members | 1,593 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Menu control - problem with setting selected item

I can't figure out how to set that an level1 and level2 item is selected at
the same time. Is this not possible?

Here is my code that set selected item:

private void UpdateMenu()
{
foreach (MenuItem n1 in mMeny.Items)
{
if (Convert.ToInt32(n1.Value) == selectedLevel1ID)
{
n1.Selected = true;
}
foreach (MenuItem n2 in n1.ChildItems)
{
if (Convert.ToInt32(n2.Value) == selectedLevel2ID)
{
n2.Selected = true;
}
}
}
}
The code seems to run as expected when I debug, but the generated html code
dosen't set selected on level1, when an item on level2 is selected.
Eirik
Jul 28 '06 #1
0 1394

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Mohit Gupta | last post by:
Hi all, Lately I have been working on an application in VB .net CF for Pocket PC device. I have a small question about Context Menu. When I try to close the window after context menu is poped...
2
by: Sisnaz | last post by:
I'm working with 2005 Beta 2 and I'm sure this is a trivial question but for the life of me I can't figure out. I placed a menu navigation componet on my master page and defined the navigation...
2
by: Peter Proost | last post by:
Hi group, I've got this ownerdraw menu module which I got from a site and modified to my personal needs, but the only problem I'm having is with the lines in a menu, when you type - as text, it...
4
by: Bart | last post by:
Hi, I have a menu on my master page. When I click on a menu item the state is reset after the page is redirected to the NavigateURL. How can fix this? Thanks Bart
7
by: VB Programmer | last post by:
How do I create a submenu so that I can only check ONE of the values? Example: Menu --> Color SubMenu --> Red Value 1 --> Yellow Value 2 --> Green Value 3 Thanks....
1
by: stinehelferw | last post by:
I need a right-click menu on a form list control with combobox controls. I used View->Toolbars->Customize to create a toolbar. I added ComboBox through commands tab. I set properties to Popup...
0
by: Wayne Erfling | last post by:
I put in the code below to disable self links in a menu control in a "master" page. It works properly if the top-level menu item has no children, but both ..Selected = false and .NavigateUrl =...
6
by: JJ | last post by:
Question: Which controls to use as menus: ============================= I must be approaching this the wrong way, as it clearly must be possible. I am writing a very basic CMS. At the top of...
0
by: RJN | last post by:
Hi I'm using the asp:Menu control in the sharepoint master page for displaying the site navigation. The site navigations are getting displayed. On clicking one of the menu items in the...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.