Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Make sitemap dependent on master page

Reply
Thread Tools

Make sitemap dependent on master page

 
 
mike
Guest
Posts: n/a
 
      03-29-2006
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?

 
Reply With Quote
 
 
 
 
=?Utf-8?B?Y2xpY2tvbg==?=
Guest
Posts: n/a
 
      03-29-2006
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?
>
>

 
Reply With Quote
 
 
 
 
mike
Guest
Posts: n/a
 
      03-31-2006
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...

 
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
non-dependent vs. dependent template names puzzlecracker C++ 1 08-07-2008 07:42 AM
How 2 place page title into window title using sitemap in master page? bednar.tomas@gmail.com ASP .Net 0 11-30-2006 03:17 PM
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 web.sitemap location dependent mike ASP .Net 1 03-21-2006 12:22 AM



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