ScioSoft's Community Blogs Optimized IT musings for the technically inclined

Referencing external URLs in your web.sitemap in ASP.NET

by James Fielding 23. February 2010 09:57

In ASP.NET, we often use site maps to set up navigation, particularly for menus. By default, the ASP.NET  site-map provider  uses the "Web.sitemap" file. Here is an example of this file for a simple site:


<?xml version="1.0" encoding="utf-8" ?>
<siteMap>
    <siteMapNode title="Home" description="Home" url="~/default.aspx">
        <siteMapNode title="Services" description="Services we offer" url="~/Services.aspx">
            <siteMapNode title="Consulting" description="Consulting services" url="~/Consulting.aspx" />
            <siteMapNode title="Support" description="Supports plans" url="~/Support.aspx" />
        </siteMapNode>
        <siteMapNode title="About Us" description="About Us" url="~/AboutUs.aspx">
            <siteMapNode title="Company" description="Our people and offices" url="~/Company.aspx" />
            <siteMapNode title="Blogs" description="Blogs from us to you"
              url="http://blogs.mysite.com/default.aspx" />
        </siteMapNode>
    </siteMapNode>
</siteMap>

So our basic menu will look like this: More...

Sciosoft Systems is a Canadian web design & development company based in Muskoka, which is in central Ontario. We provide ASP.NET website & Windows Server application development services to small and medium-sized business, as well as local government and not-for-profit groups. If you have a website project you’d like to discuss, please visit us at www.sciosoft.com.

Share |

Tags: , ,

Web Development | ASP.NET

RecentComments

Comment RSS

The opinions expressed herein are the personal opinions of the contributors and do not necessarily represent the views of Sciosoft Systems Inc.