对这个用的不多  好像 只能到xml中配置吧 ,不管怎么导向 最终显示是根据xml中配置的层级关系来的

解决方案 »

  1.   

    在*.siteMap中配置,用url传个数值。
      

  2.   

    通过XML可配置。
    参考
    http://www.cnblogs.com/webabcd/archive/2008/10/31/650773.html
    http://www.cnblogs.com/Moosdau/archive/2007/09/28/908757.html
      

  3.   

    用操作xml的方法修改<siteMapNode url="showp.aspx" title="景点">属性值。
    但是我也不会。呵呵。如果嫌麻烦,你可以不用sitemap
    没有sitemap之前,不是一样做站点地图吗?
    用一般的方法也行。
      

  4.   

    参考下 http://hi.baidu.com/zdz8207/blog/item/c4b2de5453df4a5bd0090642.html, 看看是不是你要的东西 
      

  5.   


    public partial class CreateSitemap : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            using (StreamWriter sw = new StreamWriter(Server.MapPath("Sitemap.xml"), false, Encoding.UTF8))
            {
                sw.WriteLine("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
                sw.WriteLine("<urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\" http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/09/sitemap.xsd\">");            //HTML URL
                using (StreamReader sr = new StreamReader(Server.MapPath("HTMLURL.txt"), Encoding.UTF8))
                {
                    string line = String.Empty;
                    while ((line = sr.ReadLine()) != null)
                    {
                        sw.WriteLine(URL(line));
                    }
                }            //Product URL
                DataAccess data = new DataAccess();
                using (SqlDataReader dr = data.GetDataReader("SELECT a.dw_products_id, a.Title+'_'+b.Title as CategoryTitle,a.manual_link FROM dw_products a,sub_categories b where a.sub_categories_id=b.sub_categories_id Order by dw_products_id desc"))
                {
                    while (dr.Read())
                    {
                        sw.WriteLine(URL8("http://www.xxx.com/update/" + Common.URLStringDeal(dr[1]) + "_Product.aspx?id=" + dr[0].ToString()));
                        if(!String.IsNullOrEmpty(dr[2].ToString()))
                            sw.WriteLine(URL("http://www.xxx.com/Lift_Manuals/" + dr[2].ToString().Replace(" ", "_").Replace("&", "")));
                    }
                }            //PDF Link URL
                using (SqlDataReader dr = data.GetDataReader("SELECT * FROM dw_products_articles"))
                {
                    while (dr.Read())
                    {
                        if(!String.IsNullOrEmpty(dr[4].ToString()))
                            sw.WriteLine(URL("http://www.xxx.com/hotbike/" + dr[4].ToString()));
                    }
                }            sw.WriteLine("</urlset>");
                sw.Flush();
            }
            File.Copy(Server.MapPath("Sitemap.xml"), Server.MapPath("update/Sitemap.xml"), true);
            File.Copy(Server.MapPath("Sitemap.xml"), Server.MapPath("html/Sitemap.xml"), true);        File.Copy(Server.MapPath("Sitemap.xml"), Server.MapPath("urllist.txt"), true);
            File.Copy(Server.MapPath("Sitemap.xml"), Server.MapPath("update/urllist.txt"), true);
            File.Copy(Server.MapPath("Sitemap.xml"), Server.MapPath("html/urllist.txt"), true);        
        }    private string URL(string url)
        {
            string priority = "0.5";
            string lastmod = DateTime.Now.ToString("yyyy-MM-ddThh:mm:ss-06:00");
            string changefreq = "weekly";        string temp = "";
            temp += "<url>\n";
            temp += "<loc>" + url + "</loc>\n";
            temp += "<priority>" + priority + "</priority>\n";
            temp += "<lastmod>" + lastmod + "</lastmod>\n";
            temp += "<changefreq>" + changefreq + "</changefreq>\n";
            temp += "</url>\n";        return temp;
        }    private string URL8(string url)
        {
            string priority = "0.8";
            string lastmod = DateTime.Now.ToString("yyyy-MM-ddThh:mm:ss-06:00");
            string changefreq = "weekly";        string temp = "";
            temp += "<url>\n";
            temp += "<loc>" + url + "</loc>\n";
            temp += "<priority>" + priority + "</priority>\n";
            temp += "<lastmod>" + lastmod + "</lastmod>\n";
            temp += "<changefreq>" + changefreq + "</changefreq>\n";
            temp += "</url>\n";        return temp;
        }
    }
      

  6.   

    以前做过的一个例子也是通过XML来实现的