By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,552 Members | 921 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,552 IT Pros & Developers. It's quick & easy.

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

P: n/a
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
Share this Question
Share on Google+
1 Reply

P: n/a
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.