如何使用母版页为每个网页设置站点地图 [英] How to set sitemap for every web page using master page

查看:252
本文介绍了如何使用母版页为每个网页设置站点地图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的朋友们,



我创建了一个网站名称 StudentInfo 。在该网站上,他们有近10页,如注册,母版页,登录,个人资料,ForgotPassword,ChangePassword,Markslist,FeeDetails,Home and Attendance。现在每当我访问顶部的任何页面时,我都需要,





首页 - >注册页面注册

主页 - >登录登录页面

首页 - >个人资料 - >侧面个人资料中的标记列表页面的屏蔽列表

首页 - > ;个人资料 - >费用详细信息为费用详细信息页面在侧面简介

主页 - >个人资料 - >参加人员出席会议页面





如何通过使用母版页获得这些方式。



否则有任何选项可以使用任何控件获取每个页面?



请给我建议。



提前致谢。

解决方案

您可以使用SiteMap控件和页面来完成此任务,



首先创建一个Sitemap页面并添加导航路径,

<?xml version =1.0encoding =utf-8?>

< siteMap xmlns =http://schemas.microsoft.com/AspNet /网站地图-F ile-1.0>

< siteMapNode url =A1.aspxtitle =Select Categorydescription =>

< siteMapNode url =A2.aspxtitle =Select Sub Pagedescription =>

< siteMapNode url =A.aspxtitle =Page Adescription =/>

< siteMapNode url =B.aspxtitle =Page Bdescription =/>

< siteMapNode url =C.aspxtitle =Page Cdescription =/>

< siteMapNode url =D.aspxtitle =Page Ddescription = />

< siteMapNode url =E.aspxtitle =Page Edescription =/>

< / siteMapNode>

< / siteMapNode>

< / siteMap>





然后将Sitemap控件添加到您的母版页,

< asp:SiteMapPath ID =SiteMapPath1runat =serverShowToolTips =false/> 


Dear Friends,

I have create one website name as StudentInfo. In that website they have nearly 10 pages like Registration, Masterpage, Signin, Profile, ForgotPassword, ChangePassword, Markslist, FeeDetails, Home and Attendance. Now whenever I have visit any page in top I need like,


Home-->Registration for Registration page
Home-->Signin for signin page
Home-->Profile-->Maskslist for marklist page in side profile
Home-->Profile-->FeeDetails for FeeDetails page in side profile
Home-->Profile-->Attendance for Attendance page in side profile


How to get these way by using master page.

otherwise is there any option for get each page using any control?

Please give me advice.

Thanks in advance.

解决方案

You can use the SiteMap control and page to accomplish this,

First create a Sitemap page and add the navigation paths,
<?xml version="1.0" encoding="utf-8" ?>
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
<siteMapNode url="A1.aspx" title="Select Category" description="">
<siteMapNode url="A2.aspx" title="Select Sub Page" description="" >
<siteMapNode url="A.aspx" title="Page A" description="" />
<siteMapNode url="B.aspx" title="Page B" description="" />
<siteMapNode url="C.aspx" title="Page C" description="" />
<siteMapNode url="D.aspx" title="Page D" description="" />
<siteMapNode url="E.aspx" title="Page E" description="" />
</siteMapNode>
</siteMapNode>
</siteMap>


Then add the Sitemap control to your master page,

<asp:SiteMapPath ID="SiteMapPath1" runat="server" ShowToolTips="false" />


这篇关于如何使用母版页为每个网页设置站点地图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆