Home All Groups Group Topic Archive Search About

newbie: asp.net 2.0 menu problem

Author
19 Jul 2006 5:20 PM
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

Author
19 Jul 2006 6:47 PM
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?

Jeff wrote:
Show quoteHide quote
> 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
Are all your drivers up to date? click for free checkup

Author
19 Jul 2006 7:45 PM
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


Show quoteHide quote
"tfsmag" <tfs***@gmail.com> wrote in message
news:1153334837.198744.19670@i3g2000cwc.googlegroups.com...
> 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?
>
> Jeff wrote:
>> 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
>
Author
26 Jul 2006 10:02 AM
Jeff
Show quote Hide quote
"Jeff" <it_consulta***@hotmail.com.NOSPAM> wrote in message
news:%23rkjPv2qGHA.4632@TK2MSFTNGP05.phx.gbl...
>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
>
>
> "tfsmag" <tfs***@gmail.com> wrote in message
> news:1153334837.198744.19670@i3g2000cwc.googlegroups.com...
>> 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?
>>
>> Jeff wrote:
>>> 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
>>
>
>
Author
7 Sep 2006 8:26 PM
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








Show quoteHide quote
"Jeff" <it_consulta***@hotmail.com.NOSPAM> wrote in message
news:uJvX8pJsGHA.372@TK2MSFTNGP06.phx.gbl...
>
> "Jeff" <it_consulta***@hotmail.com.NOSPAM> wrote in message
> news:%23rkjPv2qGHA.4632@TK2MSFTNGP05.phx.gbl...
>>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
>>
>>
>> "tfsmag" <tfs***@gmail.com> wrote in message
>> news:1153334837.198744.19670@i3g2000cwc.googlegroups.com...
>>> 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?
>>>
>>> Jeff wrote:
>>>> 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
>>>
>>
>>
>
>

Bookmark and Share