Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Retrieving SiteMap Menu Name from Master Page, ASP.Net 2.0, VS 2005?

Reply
Thread Tools

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

 
 
Luqman
Guest
Posts: n/a
 
      03-13-2007
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





 
Reply With Quote
 
 
 
 
Luqman
Guest
Posts: n/a
 
      03-13-2007
I got it, this can be achieved with :-

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

Best Regards,

Luqman




"Luqman" <> wrote in message
news:...
>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
>
>
>
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Menu Control and Sitemap, eliminate the home column on the menu display empire5 ASP .Net 1 01-11-2007 03:30 AM
Can Sitemap.CurrentNode use non default sitemap provider? AmitKu ASP .Net 1 09-27-2006 12:25 PM
I have created a "Auction.sitemap" instead of the default "web.sitemap" - But I can't run it. Learner ASP .Net Security 5 05-07-2006 03:37 PM
Make sitemap dependent on master page mike ASP .Net 2 03-31-2006 12:46 AM
seeking servlet "Master" keep getting "Master/servlet/Master" not found. Tomcat 5.0.25 Doug McCann Java 1 08-05-2004 09:16 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57