Make sitemap dependent on master page

Discussion in 'ASP .Net' started by mike, Mar 29, 2006.

  1. mike

    mike Guest

    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?
    mike, Mar 29, 2006
    #1
    1. Advertising

  2. 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?
    >
    >
    =?Utf-8?B?Y2xpY2tvbg==?=, Mar 29, 2006
    #2
    1. Advertising

  3. mike

    mike Guest

    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...
    mike, Mar 31, 2006
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. mike
    Replies:
    1
    Views:
    491
    sloan
    Mar 21, 2006
  2. AmitKu
    Replies:
    1
    Views:
    802
    Cowboy \(Gregory A. Beamer\)
    Sep 27, 2006
  3. Replies:
    0
    Views:
    518
  4. puzzlecracker
    Replies:
    1
    Views:
    519
    James Kanze
    Aug 7, 2008
  5. Learner
    Replies:
    5
    Views:
    270
    Dominick Baier [DevelopMentor]
    May 7, 2006
Loading...

Share This Page