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

  • Thread starter Thread starter Luqman
  • Start date Start date
L

Luqman

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
 
I got it, this can be achieved with :-

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

Best Regards,

Luqman
 
Back
Top