Reputation: 241
<?xml version="1.0" encoding="utf-8" ?>
<Home>
<Menu text="Books" url="MenuFromXml.aspx">
<SubMenu text="Asp.Net" url="MenuFromXml.aspx" id="Asp" ></SubMenu>
<SubMenu text="Ajax" url="MenuFromXml.aspx" id="AJax"></SubMenu>
<SubMenu text="MS SQL Server 2005" url="MenuFromXml.aspx" id="SQL"></SubMenu>
<SubMenu text="JavaScript" url="MenuFromXml.aspx" id="Javascript"></SubMenu>
</Menu>
The above xml file is the datasource for my menu. I want to return a url like http://www.xyzsite/MenuFromXml.aspx?Id=sql so that I can further use the query string to select required resource for each request. I need you help to solve this problem, Thank you
Upvotes: 0
Views: 703
Reputation: 9424
You can use SiteMap, the SiteMap works like XML.
In SiteMap:
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
<siteMapNode url="MenuFromXml.aspx" title="Book" description="">
<siteMapNode url="MenuFromXml.aspx?id=Asp.Net" title="Asp.Net" description="" />
<siteMapNode url="MenuFromXml.aspx?id=AJax" title="Ajax" description="" />
<siteMapNode url="MenuFromXml.aspx?id=SQL" title="MS SQL Server 2005" description="" />
<siteMapNode url="MenuFromXml.aspx?id=Javascript" title="JavaScript" description="" />
</siteMapNode>
</siteMap>
Upvotes: 1