BLACK JACK

Get busy living, or get busy dying.

导航

用宏自动生成Web.sitemap文件(ASP.NET 2.0)

Posted on 2005-12-02 23:45  J. Lin  阅读(1958)  评论(2编辑  收藏  举报

K. Scott Allen 写了一个生成Web.sitemap文件的宏(for VS 2005)。原文

运行这个宏会遍历整个工程,更具目录结构生成Web.sitemap文件。这个宏不会覆盖原有的Web.sitemap文件,只是在你想新建一个Web.sitemap文件的时候,帮你生成一个模板。

点击下载

具体使用方法:

  1. 按Alt-F8把Macro Explorer调出来
  2. 在Macros上点右键,选择“Macros IDE...”
  3. 在“MyMacros”工程(或者你自己的Macro工程)里“Add References”,把System.XML.dll加进来
  4. “Add Existing Item”,把从上面下载到的包里的SiteMapModule.vb文件添加进来。
  5. 关闭Macros IDE,回到Macro Explorer。MyMacros下面的新增了你刚才添加的macro module:“SiteMapModule”,其下有一个Macro:“CreateWebSitemap” 。右键点击这个macro,选择“Run”。

这样Web.sitemap文件就生成出来了。


相关文章:
ASP.NET 2.0 Site Navigation Features (by Scott Guthrie