Home Products Services About Contact
>Product AI have been trying to use web.sitemap as the source for a menu control as
Product B
show in the example:
<?xml version="1.0" encoding="utf-8" ?>
<siteMap>
<siteMapNode title="Home" description="Ho me" url="~/default.aspx">
<siteMapNode title="Products " description="Ou r products"
url="~/Products.aspx">
<siteMapNode title="Hardware " description="Ha rdware choices"
url="~/Hardware.aspx" />
<siteMapNode title="Software " description="So ftware choices"
url="~/Software.aspx" />
</siteMapNode>
<siteMapNode title="Services " description="Se rvices we offer"
url="~/Services.aspx">
<siteMapNode title="Training " description="Tr aining classes"
url="~/Training.aspx" />
<siteMapNode title="Consulti ng" description="Co nsulting
services"
url="~/Consulting.aspx " />
<siteMapNode title="Support" description="Su pports plans"
url="~/Support.aspx" />
</siteMapNode>
</siteMapNode>
</siteMap>
<%@ Page Language="VB" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dt d">
<html xmlns="http://www.w3.org/1999/xhtml" >
<!-- For the hover styles of the Menu control to -->
<!-- work correctly, you must include this head -->
<!-- element. -->
<head id="Head1" runat="server">
<title>Menu DataBinding Example</title>
</head>
<body>
<form id="form1" runat="server">
<h3>Menu DataBinding Example</h3>
<!-- Bind the Menu control to a SiteMapDataSour ce control. -->
<asp:menu id="NavigationM enu"
disappearafter= "2000"
staticdisplayle vels="2"
staticsubmenuin dent="10"
orientation="Ve rtical"
font-names="Arial"
target="_blank"
datasourceid="M enuSource"
runat="server">
<staticmenuitem style backcolor="Ligh tSteelBlue"
forecolor="Blac k"/>
<statichoversty le backcolor="Ligh tSkyBlue"/>
<dynamicmenuite mstyle backcolor="Blac k"
forecolor="Silv er"/>
<dynamichoverst yle backcolor="Ligh tSkyBlue"
forecolor="Blac k"/>
</asp:menu>
<asp:SiteMapDat aSource id="MenuSource "
runat="server"/>
</form>
</body>
</html>
This and other examples I have tried don't show it the way I illustrated at
the top of this email; they always seem to have the Home link as the focal
point. When I try to amend the web.sitemap to include another top-level
siteMapNode next to Home (e.g. Products) the XML gives an error.
Any idea why this is?
TIA