467,876 Members | 1,227 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,876 developers. It's quick & easy.

Retrieving SiteMap Menu Name from Master Page, ASP.Net 2.0, VS 2005?

I have setup a Menu using Master Page, and I want to retrieve the name of
the selected Menu.

I tried using following code in Page.Master,

Protected Sub MainMenu_MenuItemClick Event

Session("MyMenu")=mainmenu.SelectedItem.Text

End Sub

But the above code is not working.

My menu control is linked with Sitemap Datasource.

My requirement is just to put the selected menu name in the Session
Variable, and then go to the desired page.

Any idea please ?

Best Regards,

Luqman

Mar 13 '07 #1
  • viewed: 1219
Share:
1 Reply
I got it, this can be achieved with :-

session("Menu")=sitemap.currentnode.title

Best Regards,

Luqman


"Luqman" <pe*******@cyber.net.pkwrote in message
news:uI**************@TK2MSFTNGP02.phx.gbl...
>I have setup a Menu using Master Page, and I want to retrieve the name of
the selected Menu.

I tried using following code in Page.Master,

Protected Sub MainMenu_MenuItemClick Event

Session("MyMenu")=mainmenu.SelectedItem.Text

End Sub

But the above code is not working.

My menu control is linked with Sitemap Datasource.

My requirement is just to put the selected menu name in the Session
Variable, and then go to the desired page.

Any idea please ?

Best Regards,

Luqman



Mar 13 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by mike | last post: by
2 posts views Thread by mike | last post: by
2 posts views Thread by -D- | last post: by
5 posts views Thread by JJ | last post: by
reply views Thread by MS Development | last post: by
1 post views Thread by Velvet | last post: by
5 posts views Thread by Tim Mackey | last post: by
1 post views Thread by VB Programmer | last post: by
reply views Thread by jack112 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.