Wrox Programmer Forums
|
BOOK: Beginning ASP.NET 4.5.1 : in C# and VB
This is the forum to discuss the Wrox book Beginning ASP.NET 4.5.1: in C# and VB by Imar Spaanjaars; ISBN: 978-1-118-84677-3
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 4.5.1 : in C# and VB section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 6th, 2016, 08:54 PM
Authorized User
 
Join Date: Nov 2016
Posts: 17
Thanks: 2
Thanked 0 Times in 0 Posts
Default Ch 7, p249 SiteMapDataSource

I've been working my way through the exercises and have been reasonably successful. When I hit Step 8 on p249, Press F4 and change the ShowStarting Node property to False, the text indicates that I should see the designer update with the child menus: Home, Reviews, About and Login, as shown in Fig 7.5. That just doesn't happen!

The error I receive is:

The DataSourceID of "Menu1" must be the ID of a control of type IHeirarchalDataSource. A control with the ID 'SiteMapDataSource1' could not be found.

Can you suggest what I'm doing wrong?

Thanks
 
Old November 7th, 2016, 04:36 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

Can you post the full code for the page? When you post the code, can you please paste it in Notepad first to remove color coding and then use the forum editor's Code toolbar button to wrap your code in code tags. Otherwise, this forum messes up the code.

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!
 
Old November 7th, 2016, 10:50 PM
Authorized User
 
Join Date: Nov 2016
Posts: 17
Thanks: 2
Thanked 0 Times in 0 Posts
Default Ch 7, p249 SiteMapDataSource

After a couple tries I just shut VS down and restarted my computer. When I reopened the site project, everything was wired correctly and the menu worked as it was designed. I am using VS 2015 Professional.

Thank you for your prompt reply. The code is shown below for completeness.

<nav>
<asp:Menu ID="Menu1" runat="server" CssClass="MainMenu" DataSourceID="SiteMapDataSource1" Orientation="Horizontal" StaticEnableDefaultPopOutImage="False"></asp:Menu>
<asp:TreeView ID="TreeView1" runat="server" DataSourceID="SiteMapDataSource1" ShowExpandCollapse="False">
<LevelStyles>
<asp:TreeNodeStyle CssClass="FirstLevelMenuItems" />
</LevelStyles>
</asp:TreeView>
<asp:SiteMapDataSource ID="SiteMapDataSource1" runat="server" ShowStartingNode="False" />
</nav>
 
Old November 8th, 2016, 04:23 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Odd, sounds like a bug in VS. Glad it's working now though.

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!
 
Old November 8th, 2016, 07:41 AM
Authorized User
 
Join Date: Nov 2016
Posts: 17
Thanks: 2
Thanked 0 Times in 0 Posts
Default Monochrome.css still sticking

I'm having a recurring problem with getting changes I make to the site to take effect. I just went through the exercise on p252, entered all the code by hand and pressed Ctrl-F5. The menu items remained unchanged. I tried to Build the Website, and Rebuild the Website. I tried copying the code from the downloaded source files.

I have warnings about section#MainContent and aside#Sidebar being overqualified, the universal selector(*) being slow and the !important qualifier. The site builds correctly but does not incorporate the style sheet changes.

So what an I doing wrong?
 
Old November 14th, 2016, 03:18 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

Can you post the relevant code for the master page? Also, could it be a cache issue? Try reloading with Ctrl+F5 and see if that fixes the issue.

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!





Similar Threads
Thread Thread Starter Forum Replies Last Post
Ch 4 and Ch 13/15 - controls and the DataPager AlanWheeler BOOK: Beginning ASP.NET 4.5 : in C# and VB 3 February 24th, 2014 04:56 PM
Ch 9-but will learn more abt User Controls (ch 8) btcomp BOOK: Beginning ASP.NET 4 : in C# and VB 1 August 24th, 2010 11:40 AM
Search ch 13, ch 16 sporik BOOK: Beginning PHP 6, Apache, MySQL 6 Web Development ISBN: 9780470391143 0 October 27th, 2009 04:44 PM
SiteMapDataSource won't find my root node... thenoseknows ASP.NET 2.0 Professional 0 October 31st, 2006 04:22 PM
Ch. 4 & Ch. 12 athena BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 0 July 23rd, 2004 10:54 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.