CodeVerge.Net Beta


   Explore    Item Entry    Members      Register  Login  
NEWSGROUP
.NET
Algorithms-Data Structures
Asp.Net
C Plus Plus
CSharp
Database
HTML
Javascript
Linq
Other
Regular Expressions
VB.Net
XML

Free Download:




Zone: > NEWSGROUP > Asp.Net Forum > general_asp.net.master_pages_themes_and_navigation_controls Tags:
Item Type: NewsGroup Date Entered: 2/17/2008 11:51:32 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 2 Views: 50 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
3 Items, 1 Pages 1 |< << Go >> >|
bdway01
Asp.Net User
Programmatically Modify Site-Map Nodes in Memory Bug2/17/2008 11:51:32 PM

0/0

I have seen a ton of posts that refer to this MSDN article and I have tried to implement it myself but I am having a problem.  My situation is much like that in the article.  I would like to dynamically alter the Titles and URL for the current and current.parent nodes so that the breadcrumb menu will show meaningful values.  I have added the MSDN articles example code directly into the content page that is responsible for displaying the article a user has chosen and the Titles and URLs do change, once.  When I navigate away from that particular page the breadcrumb always uses my changed values for the new pages current and current.parent nodes.  Since I am going to a new page shouldn't the values for these nodes change and refresh?

 To clarify my sitemap is like this:
<siteMapNode title="Home" url="~/Default.aspx" description="">
    <siteMapNode title="Articles" url="~/ShowCategories.aspx" description="">
        <siteMapNode title="Browse Articles" url="~/BrowseArticles.aspx">
            <siteMapNode title="Article" url="~/ShowArticle.aspx" />
        </siteMapNode>
    </siteMapNode>
</siteMapNode>

When viewing an article I open url: ShowArticle.aspx?ID=123
Breadcrumb reads: Home -> Articles -> Browse Articles -> Article

What I would like to see is: Home -> Articles -> Selected Category -> Selected Article
I can get the above result, but if I were then to click on the Articles link in the breadcrumb to go to the ShowCategories.aspx page, the breadcrumb will now read:
Selected Category -> Selected Article instead of Home -> Articles.

Another option:  I have thought of building the sitemap from a database that contains all of the possible articles, but that would mean I would end up with a sitemap that had thousands of nodes with a URL like ShowArticle.aspx?ID=x.  Also, new articles are added all of the time.  Creating a node for all of these items seems like a bad idea, especially since the MSDN article I reference here was written to address my issue.  Is anyone using this successfully?  Or does anyone have a workaround that does not require a hugely bloated sitemap in memory?

Dave Sussman
Asp.Net User
Re: Programmatically Modify Site-Map Nodes in Memory Bug2/18/2008 9:24:44 AM

0/0

The SiteMapResolve event should really go in global.asax, since it's a global event. I've done this sucessfully on a demo site (see http://www.ipona.com/samples/ANV201%20-%20ASP.NET%202.0%20Navigation.zip) building nodes from news articles. Try moving the code to global.asax; hook up the event in application load and then add in the resolve event as another event procedure.

d

bdway01
Asp.Net User
Re: Programmatically Modify Site-Map Nodes in Memory Bug2/21/2008 11:02:39 PM

0/0

Thanks Dave, that was way more than I had hoped for!

3 Items, 1 Pages 1 |< << Go >> >|


Free Download:


Web:
Programmatically Modify Site-Map Nodes in Memory Bug - ASP.NET Forums Programmatically Modify Site-Map Nodes in Memory Bug. Last post 02-21-2008 6:02 PM by bdway01. 2 replies. Sort Posts: ...
DevASP.Net How to: Programmatically Modify Site-Map Nodes in ... How to: Programmatically Modify Site-Map Nodes in Memory Knowledge Base Articles of Visual Basic.Net Directory of ASP.NET, VB. ... Errors, Bugs & Fixes ...
Programmatically Modify Site-Map Nodes in Memory - .NET ASP Programmatically Modify Site-Map Nodes in Memory. Question posted by: bburkhart (Guest) on March 17th, 2006 07:55 PM ...
Programmatically Modify Site-Map Nodes in Memory Programmatically Modify Site-Map Nodes in Memory. First look at: http://msdn2. microsoft.com/en-us/lib...25(VS.80).aspx ...
modifying web.config programmatically on install ... Tags: programmatically, modify. I have built a web app with VB.NET. .... first an XmlDocument loads in memory the xml web.config file ...
Sitemaps and query strings with membership - ng.asp-net-forum ... This article might help: Programmatically Modify Site-Map Nodes in Memory. http: //msdn2.microsoft.com/en-us/library/ms178425.aspx ...
Securing ASP.NET Site Navigation NET site navigation allows individual site-map nodes to be secured by a role ... Tools like virus scanners should not be configured to modify site-map files ...
CodeProject: Stop editing 'web.sitemap'--Let unknown pages ... Jan 12, 2007 ... To programatically access and modify the page title, you must use the ASP. ..... I found this article on how to modify site-map nodes in ...
Help! Can not debug SiteMapResolveEventHandler function. - ASP.NET ... Because I wanto programmatically Modify Site-Map Nodes in Memory, I adopt the method mentioned in following link: ...
.NET ASP Page 61 - Bytes Site Map Dynamic controls and viewstate · "Failed to access IIS metabase" on XP · Programmatically Modify Site-Map Nodes in Memory · long running process from ASP . ...




Search This Site:










website not being at least a page height

get form values from another page

getting started....

asp.net 3.5?

asp to asp.net conversion issues. help ?

3.0.12 usersonline still broken?

getting a strange error when trying to edit a module. see bottom post. no 'edit webfilter settings' menu option is showing up in the actions menu either...

can't find dataset tool

3 softwares to be downloaded with beta

security problem, can't log in under ie

an error has occurred writing to the exception log

postback displeasures

the builtin asp.net development server problem

how to select values from table into session variables?

dnn 03.01.00 install - portal failed to install

show copyright credits defaulting back to checked

tab skins in 10d

apply theme on webusercontrol

new modules

ecommerce in c#

asp.net and domain host pointing

ibuyspy hosting problem(web.config&access db)

moving or renaming an aspx page with datasource in it.

how to add a user-control to a page?

how to create admin account

uploading images to server

very, very basic help needed!

dnn1 dotnetnuke configuration error

problem with portal on windows 2003 webedition

can´t create a new item

 
All Times Are GMT