newbie: asp.net 2.0 menu problem

J

Jeff

hey

asp.net 2.0

I'm using 2 menus in my webportal project. One menu is the main menu, and a
sub-menu shows menu item dependent on what is the selected menu item in main
menu.

I followed this example on MSDN:
http://msdn2.microsoft.com/en-us/library/16yk5dby.aspx

This works....

But here is my PROBLEM:
I've got a webpage which is not accessible from the menu. But when this
webpage is displayed I want the sub-menu to display menu items related to
this webpage. I don't know how to do this, because no events in the main
menu is triggered.

Any suggestions?

Jeff
 
T

tfsmag

can you not leave populate the second menu programmatically depending
on what page it's on? leave the items menu free, then depending on the
page add menu items using your codebehind like this.

Dim itmMenuItem1 As New MenuItem("Menu item text",
"menuitemvalue", "imageurl", "navigateurl")

menu1.items.add(itmMenuItem1)

you can also declare a menu item and add it as a child of another item
like this


Dim itmMenuItem2 As New MenuItem("Menu item text",
"menuitemvalue", "imageurl", "navigateurl")

itmMenuItem1.ChildItems.Add(itmMenuItem2)

does this make any sense?
 
J

Jeff

I guess I could use it, but I would prefer to have it set in my .sitemap
file.

I forgot to mention that this is webpage and 4 other pages should have the
same sub menu...:

example sub menu items:
Product Page: <this is the page I mentioned in my previous post>
Prices:
Location
etc

And if the user clicks on any of those menu items (mentioned above), a
related page should appear. But the sub menu should still be the same.

Any suggestions?

Jeff
 
J

Jeff

Jeff said:
I guess I could use it, but I would prefer to have it set in my .sitemap
file.

I forgot to mention that this is webpage and 4 other pages should have the
same sub menu...:

example sub menu items:
Product Page: <this is the page I mentioned in my previous post>
Prices:
Location
etc

And if the user clicks on any of those menu items (mentioned above), a
related page should appear. But the sub menu should still be the same.

Any suggestions?

Jeff
 
U

Uriah Piddle

Hi Jeff,

What was the solution? Other developers google the groups for their
research. If you figure out a problem on your own like this, instead of just
posting CASE SOLVLED (which is considerate of you because you are notifying
potential helpers so they don't waste their time), you might also summarize
how you solved it and thereby help some desperate developer who got to your
post through google and who has the same problem and wants to know how you
did it.

Steve
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top