Navigator Menu in Asp.Net

Sabarimahesh
Posted by Sabarimahesh under C# category on | Points: 40 | Views : 1785
Web.SiteMap

<?xml version="1.0" encoding="utf-8"?>
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0">
<siteMapNode
url="~/default.aspx"
title="Website"
description="Web site">

<siteMapNode
url="http://www.dotnetfunda.com"
title="DotNETFUNDA"
description="To Learn">
<siteMapNode
url="https://www.gmail.com"
title="Gmail"
description="My Mail"/>
<siteMapNode
url="https://www.hotmail.com/"
title="Hotmail"
description="Alternate Mail"/>
<siteMapNode
url="http://www.google.co.in/"
title="Google"
description="Search Engine"/>
</siteMapNode>

</siteMapNode>
</siteMap>



ASP.NET SOURCE CODE

<%@Page Language="C#" AutoEventWireup="true" CodeFile="how_to_use_Navigation_Menu.aspx.cs" Inherits="how_to_use_Navigation_Menu" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>How to Use Navigation Menu</title>
</head>
<body>
<form id="form1" runat="server">
<div style="text-align: left">

<asp:Menu ID="WebMenu" runat="server" DataSourceID="SiteMapDs">
</asp:Menu>
<asp:SiteMapDataSource ID="SiteMapDs" runat="server" />

</div>
</form>
</body>
</html>

Comments or Responses

Login to post response