473,387 Members | 1,590 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Multiplw sitemaps files

2
Hi guys -

I have multiple sitemap files. If a user chooses one action, I want them to use Web.sitemap for their navigation. If they choose another action, I want them to use Web2.sitemap. The problem is that in the sitemap file, all your nodes must be unique, thus the need for 2 separate files since I have multiple files in both sitemap files.

Example:

Input:
Login --> Default --> Report --> Voucher

Approval:
Login --> Path Choice --> Default --> Report --> Voucher
Login --> Path Choice --> Pending --> Report --> Voucher
Login --> Path Choice --> Checks --> Check Info

What VB code do I use on my page load to use Web2.sitemap under one condition or use Web.sitemap under another?

I also added the following code to my web.config file:

<siteMap defaultProvider="Web" enabled="true">
<providers>
<add
name="Web"
type="System.Web.XmlSiteMapProvider"
siteMapFile="Web.sitemap" />

<add
name="Web2"
type="System.Web.XmlSiteMapProvider"
siteMapFile="Web2.sitemap" />
</providers>
</siteMap>

How do I switch between the two? I'm trying something like me.SiteMapPath1.SiteMapProvider = "Web2" but it doesn't work.

Thanks.
Feb 9 '07 #1
3 1028
kenobewan
4,871 Expert 4TB
You can't use the web config in this way. Better to leave it out and handle it in a class... What is the condition that you want to use?
Feb 11 '07 #2
jleone
2
To tell you the truth, I actually got it to work. I was missing a minor piece I came across on some web searching.

<siteMap defaultProvider="Web" enabled="true">
<providers>
<add name="Web" type="System.Web.XmlSiteMapProvider" siteMapFile="~/Web.sitemap"/>
<add name="Web2" type="System.Web.XmlSiteMapProvider" siteMapFile="~/Web2.sitemap"/>
<add name="Web3" type="System.Web.XmlSiteMapProvider" siteMapFile="~/Web3.sitemap"/>
</providers>

The "~/" in front of the siteMapFile file name made it work.

Thanks.
Feb 12 '07 #3
kenobewan
4,871 Expert 4TB
My bad - well done!
Feb 13 '07 #4

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

Similar topics

2
by: Mike | last post by:
I am sure that I am making a simple boneheaded mistake and I would appreciate your help in spotting in. I have just installed apache_2.0.53-win32-x86-no_ssl.exe php-5.0.3-Win32.zip...
44
by: Xah Lee | last post by:
here's a large exercise that uses what we built before. suppose you have tens of thousands of files in various directories. Some of these files are identical, but you don't know which ones are...
0
by: Tom Lee | last post by:
Hi, I'm new to .NET 2003 compiler. When I tried to compile my program using DEBUG mode, I got the following errors in the C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7 \include\xdebug...
2
by: Michael D. Ober | last post by:
In straight HTML, you can set the page title using the code: <html><head><title>This is a page title</title></head></html> How is this done using sitemaps in ASP.NET 2.0. Thanks, Mike.
7
by: JJ | last post by:
I'm playing aournd with my first asp.net 2.0 web site and looking at the Web.sitemap file. It seems there's a lot of publicity at the moment about Google's sitemaps and how they are supposed to...
0
by: DJ | last post by:
I am setting up an interface that mimics normal desktop applications for our web app. I use the SiteMap and CSS to create a Menubar, etc. Below it is the normal icon bar. If I use the sitemap in...
0
by: fran7 | last post by:
Hi, Just wondering if anyone can tell me if I get my service provider on a windows 2003 platform to tweak the settings in ISAPI to turn my dynamic urls to static ones, how this affects the sitemaps I...
2
by: paintedjazz | last post by:
I've created a bash script to create a sitemap but it is rather ordinary and nothing about it is appealing. Can anyone provide me with examples of sitemaps that they've seen that they can really...
3
by: aRTx | last post by:
I have try a couple of time but does not work for me My files everytime are sortet by NAME. I want to Sort my files by Date-desc. Can anyone help me to do it? The Script <? /* ORIGJINALI
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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...
0
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,...
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...

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.