473,473 Members | 1,524 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Make sitemap dependent on master page

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 page, I want the appropriate Master
Page to load. As both sites are on different subnets, I can detect the
site through Request.UserHostAddress and deliver the appropriate Master
Page.

My question is whether I can maintain 2 separate SiteMap files in the
one web site and associate one with each Master Page or will ASP.NET
crack it?

Mar 29 '06 #1
2 1702
You canot do this using the SiteMapDataSource control because you cannot
specify which XML file it uses for it's data, it has to use web.sitemap.
However the menu control can use any XML data source, not just the
SiteMapDataSource control, so you could for example use a different
XMLDataSource control in each master page and point that at whatever Site Map
XML file you want. I have even seen an SQL based site map datasource control
that someone created.

"mike" wrote:
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 page, I want the appropriate Master
Page to load. As both sites are on different subnets, I can detect the
site through Request.UserHostAddress and deliver the appropriate Master
Page.

My question is whether I can maintain 2 separate SiteMap files in the
one web site and associate one with each Master Page or will ASP.NET
crack it?

Mar 29 '06 #2
Yeah, I saw something a little while ago about a SQL based sitemap.
This might be a viable solution. I asked a question a little while ago
about selecting to display only parts of the sitemap but it sounded
like I'd have to create a custom class to handle it. My thought was to
configure the sitemap file something like this:

<sitemap>
<site1>
<sitemapnode />
....
</site1>
<site2>
<sitemapnode />
...
</site2>
</sitemap>

I think MS are on a good thing with this stuff but SiteMaps don't
support multiple site intranets. Maybe in the next version of ASP.NET...

Mar 31 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
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>...
0
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....
1
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...
1
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"...
1
by: Tarun Mistry | last post by:
Hi guys, I want to create a sitemap (lets call it a map to avoid confusion with .NET sitemaps) for my website, as in, a single page that lists all of the other pages on my web site. e.g....
1
by: Luqman | last post by:
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 ...
2
by: =?Utf-8?B?SmFtZXMgUGFnZQ==?= | last post by:
Does anyone know a way to allow duplicate URL's in a sitemap? Here's my problem: I'm designing (almost done) an online store with the following navigational structure: Home / Department /...
1
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...
0
by: vingomail | last post by:
Good Morning, I have two site map: "common.sitemap, loginuser.sitemap", two master page:" common.master, loginuser.master", in common.master, there is a Navigation control: TreeView...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
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...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
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 ...
0
muto222
php
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.