0
votes

I'm using site navigation in my site which uses <asp:sitemap> and every time I add a new aspx file to my website I have to edit my web.sitemap manually. I'd like to know if there's any way to update web.sitemap automatically (that's not database driven).

I searched for a solution and found these links but to be honest I couldn't implement/use them. (I'm new to asp.net)

stop editing 'web sitemap'

Building a dynamic SiteMap in ASP.NET 2.0 for a large website

2

2 Answers

0
votes

The best way is to create your own custom site map provider, use File IO to read all of the files with an ASp.NET extension, cache it, and use this to build the sitemap from.

0
votes

...or use a pre-build system. Here's a tutorial that utilises one: http://www.aspfree.com/c/a/ASP.NET/Dynamic-Sitemap-and-Navigation-in-ASPNet/