ASP.NET SiteMapProvider Question

SelArom

Senior member
Sep 28, 2004
872
0
0
www.djselarom.com
hi, i've got a navigation menu that ties to a sitemap file served by a sitemapprovider (I think that's how it works, I'm still just learning). what I want to be able to do is edit the sitemap in code so that I can add/edit/remove menu entries, and write those changes directly to the sitemap file. I can't really find any information on how to do this. I figure I could probably parse through the XML, and if I have to I will...

but it seems to me that something like this should be built in, no? anybody have any ideas? thanks!

-SelArom
 

mAdMaLuDaWg

Platinum Member
Feb 15, 2003
2,437
1
0
Well, I'd definitely recommend against writing to an XML file because it just opens up a can of worms when you have to give write permission.
It would be much better if you stored the Sitemap info into a SQL database, of course, you are going to have to override a lot of the SiteMap functions.. but from what you describe, its the most suitable option.
Here is a good link which describes what you need to do: http://msdn.microsoft.com/library/?url=...rary/en-us/dnaspp/html/CustSiteMap.asp