如何将站点地图放在asp.net应用程序中 [英] how to put sitemap in asp.net application

查看:72
本文介绍了如何将站点地图放在asp.net应用程序中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的朋友,

在我的应用程序中,我想将SiteMap和导航URL放置在一起.到目前为止,我还没有解决这个概念.因此,请给我一些建议,



问候,

Anilkumar.

Dear Friends,

In my application i want to put SiteMap with navigate URL.Till now i have not worked on this concept.So please give me suggestions,



Regards,

Anilkumar.

推荐答案

这里有一些Code Project文章
ASP.NET中的简单站点地图 [站点地图和站点地图索引生成器 [
here are some Code Project articles
Simple Sitemaps in ASP.NET[^]
Sitemap and Sitemap Index Generator[^]


<asp:treeview id="TreeView1" runat="server" imageset="Simple" datasourceid="SiteMapDataSource1" xmlns:asp="#unknown">
            <hovernodestyle font-underline="True" forecolor="#5555DD" />
            <nodestyle font-names="Tahoma" font-size="10pt" forecolor="Black" horizontalpadding="0px">
                NodeSpacing="0px" VerticalPadding="0px" />
            <parentnodestyle font-bold="False" imageurl="~/Images/bullet-red.png" />
            <rootnodestyle imageurl="~/Images/bullet.png" />
            <selectednodestyle font-underline="True" forecolor="#5555DD" horizontalpadding="0px">
                VerticalPadding="0px" />
        </selectednodestyle></nodestyle></asp:treeview>


<asp:sitemapdatasource id="SiteMapDataSource1" runat="server" xmlns:asp="#unknown" />



创建Web.Sitemap文件



Create Web.Sitemap file

<sitemap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0">
        <sitemapnode url="http://www.test.com/" title="ASP.NET" description="ASP.NET Tutorials">
          <sitemapnode url="http://www.devmanuals.com/tutorials/ms/aspdotnet/index.html" title="Controls" description="Standards Controls">
            <sitemapnode url="~/TextBox.aspx" title="TextBox" description="TextBox Control" />
            <sitemapnode url="~/BulletList.aspx" title="BulletList" description="BulletList Control" />
            <sitemapnode url="~/Image.aspx" title="Image" description="Image Control" />
            <sitemapnode url="~/ImageMap.aspx" title="ImageMap" description="ImageMap Control" />
          </sitemapnode>
    </sitemapnode>
</sitemap>



在ASP> NET中创建站点地图的最佳方法是创建xml文件.
检查以下内容:
http://msdn.microsoft.com/en-us/library/yy2ykkab.aspx
http://www.codeproject.com/KB/aspnet/dynamicsitemap.aspx
Hi
The best way to create a sitemap in ASP>NET is creating a xml file.
Check the followings:
http://msdn.microsoft.com/en-us/library/yy2ykkab.aspx
http://www.codeproject.com/KB/aspnet/dynamicsitemap.aspx


这篇关于如何将站点地图放在asp.net应用程序中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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