Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 3.5 > ASP.NET 3.5 Professionals
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 3.5 Professionals If you are an experienced ASP.NET programmer, this is the forum for your 3.5 questions. Please also see the Visual Web Developer 2008 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 3.5 Professionals section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old October 14th, 2008, 07:14 AM
Friend of Wrox
 
Join Date: Jul 2003
Location: , , .
Posts: 121
Thanks: 1
Thanked 0 Times in 0 Posts
Default Problem with Web.sitemap?

Hello everybody,

I have an “unexplainable” problem with the “SiteMapPath” control and Web.Sitemap files I’ve created. In my particular case I have to go to same set of pages from different part of my application. The problem with the Web.Sitemap file is you can not to use same URL in different nodes in same file. So, to go around this problem I’ve created several additional web.sitemap files and call them from my main Web.Sitemap file using the siteMapFile property as shown below:

<?xml version="1.0" encoding="utf-8" ?>
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
  <siteMapNode url="~/SearchMenu.aspx" title="Home" >
    <siteMapNode url="~/UserDisplayName.aspx" title="Display Name" >
      <siteMapNode siteMapFile="WebDispayName.sitemap"/>
    </siteMapNode>
    <siteMapNode url="~/UserFirstName.aspx" title="First Name" >
      <siteMapNode siteMapFile="WebFirstName.sitemap"/>
    </siteMapNode>
    <siteMapNode url="~/UserLastName.aspx" title="Last Name" >
      <siteMapNode siteMapFile="WebLastName.sitemap">
    </siteMapNode>
    <siteMapNode url="~/ContactInformation.aspx" title="Contacts" />
  </siteMapNode>
</siteMap>


All auxiliary web.sitemap files are shown below.

This is WebDispayName.sitemap file:

<?xml version="1.0" encoding="utf-8" ?>
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
  <siteMapNode >
    <siteMapNode url="~/MultiResult.aspx" title="Multi-Result" />
    <siteMapNode url="~/SingleResult.aspx" title="Single Result" />
    <siteMapNode url="~/MessageForm.aspx" title="Message Page" />
    <siteMapNode url="~/ErrorForm.aspx" title="Error Page" />
  </siteMapNode>
</siteMap>


This is WebFirstName.sitemap file:

<?xml version="1.0" encoding="utf-8" ?>
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
  <siteMapNode >
    <siteMapNode url="~/MultiResult.aspx" title="Multi-Result" />
    <siteMapNode url="~/SingleResult.aspx" title="Single Result" />
    <siteMapNode url="~/MessageForm.aspx" title="Message Page" />
    <siteMapNode url="~/ErrorForm.aspx" title="Error Page" />
  </siteMapNode>
</siteMap>


This is WebLastName.sitemap file:

<?xml version="1.0" encoding="utf-8" ?>
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
  <siteMapNode >
    <siteMapNode url="~/MultiResult.aspx" title="Multi-Result" />
    <siteMapNode url="~/SingleResult.aspx" title="Single Result" />
    <siteMapNode url="~/MessageForm.aspx" title="Message Page" />
    <siteMapNode url="~/ErrorForm.aspx" title="Error Page" />
  </siteMapNode>
</siteMap>


You can see, all auxiliary files looking the same. The problem is, if I go, for example, from the UserFirstName.aspx page to the MultiResult.aspx page, I should see in the SiteMapPath control like this:
Home>First Name>Multi-Result , but I see Home>Last Name>Multi-Result or sometime Home>Display Name>Multi-Result instead by some reason? What am I doing wrong?


Thanks in advance,
Dmitriy
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Web.sitemap problem Dmitriy ASP.NET 3.5 Basics 0 October 14th, 2008 03:04 PM
web.sitemap workidoo BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 2 June 13th, 2008 08:42 AM
Calling Web.Sitemap from XSLT kwilliams XSLT 9 December 7th, 2007 08:03 PM
One "web.sitemap" for two languages!!?? MTLedari ASP.NET 2.0 Professional 0 May 18th, 2007 01:42 AM
Web.Sitemap Tremmorkeep BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 1 July 21st, 2006 05:32 PM



All times are GMT -4. The time now is 07:26 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.