Author: gazalec | Posted on: 4/22/2009 1:54:55 AM | Views : 288

Hi,

I was wondering if anyone knew of any way of editting a sitemap at runtime. I am currently in the middle of developing a website and I have got to the content management system. Here I would like to add, delete and edit pages. Which I can do with the content but whenever I try to add, delete or edit the entry in the sitemap it throws an exception
"Error, Collection is read only"
 
 Simplified Code
1 protected void addPageToSiteMap(string parentURL, string title, string url, string description)
2 {
3 SiteMapNode parent = SiteMap.Provider.FindSiteMapNode(parentURL);
4 SiteMapNode node = new SiteMapNode(SiteMap.Provider, title, url, title, description);
5 ...

Go to the complete details ...