473,545 Members | 529 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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_MenuIt emClick Event

Session("MyMenu ")=mainmenu.Sel ectedItem.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
1 1337
I got it, this can be achieved with :-

session("Menu") =sitemap.curren tnode.title

Best Regards,

Luqman


"Luqman" <pe*******@cybe r.net.pkwrote in message
news:uI******** ******@TK2MSFTN GP02.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_MenuIt emClick Event

Session("MyMenu ")=mainmenu.Sel ectedItem.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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2034
by: mike | last post by:
I have 2 sites in my company. My .NET site uses a master page and a Menu control connected to a sitemap. In my sitemap file I would like to be able to do something like this: <sitemap> <sitemapnode site="City1"> <sitemapnode name="home" ... /> ***other menu items here*** </sitemapnode> <sitemapnode site="City2">
2
1711
by: mike | last post by:
I'm using ASP.NET 2.0 and IIS 6 I've got a business with 2 sites requiring separate intranet info. Currently, I have 2 separate intranet sites set up in IIS. This leads to having to double up on shared pages which I'd rather not have. Both sites use a master page and a Menu control bound to a SiteMap. When a user loads the intranet home...
2
2021
by: -D- | last post by:
I'm taking my first stab at using xml, so please bear with my novice questions and understanding of xml. I'm trying to create an xml file that holds all my website navigation. If I understand correctly, I can use xslt to create different menus from the xml file. What I'm trying to accomplish is to create a top menu bar, left navigation...
5
1940
by: JJ | last post by:
Although this question involves Flash, I suspect the actual issue is an asp one.. I am trying to open the web.sitemap file in an .swf file enbedded in an asp page (I'm working in VS 2005). I get an error in Flash when it trys to open this file using standard Flash commands. However when I change the file name and command to 'Web.xml' it...
0
1524
by: MS Development | last post by:
Hello Newgroup, I'm new to ASP.NET and its nice navigation features. I have now some problems with them which I hope can anyone solve. So here we go: The generel idea is I have a page like e. g. eBay. On the eBay site you have a "My eBay" Link in the top menu navigation. If you click on this link you enter the member section where you can...
1
2461
by: Alec MacLean | last post by:
Hi. I'm using VS2005 Pro to work on a website project for my company. The site has several navigation elements, all based on the standard VS2005 navigation components. I have high-level section navigation provided via a horizontal menu, a SiteMapPath to provide a breadcrumb and a vertical menu component on the left edge.
1
4500
by: Velvet | last post by:
I keep getting this error: Could not find the sitemap node with URL '~/Web.sitemap'. I have a master page that has a menu control and a SiteMapDataSource on it. <asp:Menu ID="Menu1" runat="server" Orientation="Horizontal" DataSourceID="SiteMapDataSource1"> </asp:Menu>
5
15039
by: Tim Mackey | last post by:
hi, i have put my web.sitemap in /App_Data so i can edit it programatically via a web admin page, inheriting the modify permissions from the App_Data folder etc. i was hoping the provider would simply persist any changes i made, but it doesn't happen. e.g. selected.ParentNode.ChildNodes.Remove(selected); throws a NotSupportedException...
1
2029
by: VB Programmer | last post by:
Using ASP.NET 2.0 with Memberships. I have 2 folders, admin and client. Each folder has a sitemap file, admin.sitemap and client.sitemap, in the appropriate directory. I have a master page with a menu control. How can I load the correct sitemap file into the menu control based on the user's current role?
0
7465
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7398
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7656
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7416
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
1
5325
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3449
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3441
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1878
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1013
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.