Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3
This is the forum to discuss the Wrox book Beginning ASP.NET 3.5: In C# and VB by Imar Spaanjaars; ISBN: 9780470187593
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 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
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old January 28th, 2010, 11:45 AM
Authorized User
 
Join Date: Jan 2010
Location: UK
Posts: 14
Thanks: 4
Thanked 1 Time in 1 Post
Default Menu Controls, ch 7 p245 -

As a matter of general principle I like to add comments to my files.

Working through the Menu Control content in ch 7 I built the web.sitemap file with no problems. Before I continued to insert the Menu control into the MasterPage.Master file I added a few comments.

I then inserted the Menu control and, rather than seeing the example as in figure 7-5, I saw 'Root' instead of 'Home'. This seemed to be inconsistent so I revisited web.sitemap and removed the comments. Once that was done I restarted the Menu control process and this time everything behaved as shown in Fig 7-5.

Being ever curious I wondered why I could not insert a comment into web.sitemap, and experimented with the positioning of the comments.

It may or may not be a measure of my simple mind here, but when the comment was as positioned as follows:

Code:
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >

    <!--this is a comment-->

    <siteMapNode url="~/" title="Home" description="Home">
    <siteMapNode url="~/Default.aspx" title="Home" description="Go to the homepage" />
        ...
it forced the 'Root' display as noted above.

However, if the comment was positioned as:

Code:
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >

    <siteMapNode url="~/" title="Home" description="Home">

    <!--this is a comment-->
    
    <siteMapNode url="~/Default.aspx" title="Home" description="Go to the homepage" />
        ...
everything behaved as expected.


So, just to clarify my thinking.

Are comments allowed, or not recommended in web.sitemap.

Why is the positioning so critical?

Would it actually matter anyway if the screen showed 'Root' rather then the correct descriptor, or would there be problems further down the line?

Apologies for asking such trivial questions.
__________________
Alan.
Reply With Quote
  #2 (permalink)  
Old January 29th, 2010, 11:11 AM
Imar's Avatar
Wrox Author
Points: 72,042, Level: 100
Points: 72,042, Level: 100 Points: 72,042, Level: 100 Points: 72,042, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,081
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Quote:
Are comments allowed, or not recommended in web.sitemap.
Apparently they are, but not in the root ;-)
Quote:
Why is the positioning so critical?
I am not 100% sure about the actual implementation but it might see the comment as an element as well (which it is) and not see it's not a sitemap node.
Quote:
Would it actually matter anyway if the screen showed 'Root' rather then the correct descriptor, or would there be problems further down the line?
Does it look good at run-time?

I wouldn't worry about documentation sitemaps too much. IMO, they are pretty self describing if you know how they work in general.

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
Reply With Quote
The Following User Says Thank You to Imar For This Useful Post:
Alanrf (January 29th, 2010)
Reply


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
CH 15 Context Menu - Element Menu Items Razzy The Pug BOOK: Ivor Horton's Beginning Visual C++ 2005 2 November 9th, 2008 03:53 PM
ch 13 - sketcher menu problem zamontgo BOOK: Ivor Horton's Beginning Visual C++ 2005 0 May 24th, 2008 10:11 PM
Menu Help ch.2 klimek BOOK: Professional XNA Game Programming: For Xbox 360 and Windows ISBN: 978-0-470-12677-6 2 June 7th, 2007 09:13 AM
Ch 6 Templated Controls geomar BOOK: Professional ASP.NET 2.0 Server Control and Component Development ISBN: 978-0-471-79350-2 2 February 3rd, 2007 07:58 PM
Menu hiding under controls arnabghosh Classic ASP Basics 2 June 17th, 2005 06:15 PM



All times are GMT -4. The time now is 12:16 AM.


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