Wrox Programmer Forums
BOOK: Professional ASP.NET 4 : in C# and VB
This is the forum to discuss the Wrox book Professional ASP.NET 4 in C# and VB by Bill Evjen, Scott Hanselman, Devin Rader; ISBN: 9780470502204
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional ASP.NET 4 : 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 August 8th, 2010, 12:01 AM
Registered User
Join Date: Aug 2010
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default ch 16 code samples

code samples 2 & 3 ( & maybe others) in ch 16 reference a file, DailyLinks.ascx; the code is unusable without this file - the page won't work without it - where is it? ... also there is an image file reference, same problem

ps someone posted this same q almost two years ago - no answer
Old August 8th, 2010, 03:55 AM
Imar's Avatar
Wrox Author
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts

Hi there,

I agree the file seems to be missing, and I think Wrox should be able to fix that.

However, I don't think the file is that relevant for this example. I think you can just create a simple user control called DailyLinks yourself, add a few links to it, and store it in the same folder as the main page is. It's just there - as far as I can see - to demo the capability of wrapping up your own User Controls.


Imar Spaanjaars
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 August 9th, 2010, 02:14 PM
Friend of Wrox
Join Date: Jun 2007
Posts: 477
Thanks: 10
Thanked 19 Times in 18 Posts

Yeah, Imar's right, the file is not strictly necessary, any user control will do. While they're a great way to build a complete component (because you can encapsulate all the code to make it work in the code behind for the .ascx file) user controls are great as a way to encapsulate simple XHTML code that you need to spread across the website. Generally master pages make a better choice, but if there are several alternate controls which should go in different locations, it's possible a combo approach would be most efficient. Write a content placeholder control in the master page and insert the default user control that should appear on most pages. However, each content page can control its display. If you don't include a content tag with that placeholder's name, the page will display with the default user control. If you specify the content tag but leave it empty, the content page will not display the default control (or anything else in that spot), or you can specify the content tag and call an alternate user control (or even just write custom XHTML). Very flexible.

Whatever you can do or dream you can, begin it. Boldness has genius, power and magic in it. Begin it now.
-Johann von Goethe

When Two Hearts Race... Both Win.
-Dove Chocolate Wrapper

Chroniclemaster1, Founder of www.EarthChronicle.com
A Growing History of our Planet, by our Planet, for our Planet.

Similar Threads
Thread Thread Starter Forum Replies Last Post
Search ch 13, ch 16 sporik BOOK: Beginning PHP 6, Apache, MySQL 6 Web Development ISBN: 9780470391143 0 October 27th, 2009 04:44 PM
Ch 16 Replication trondta BOOK: Professional SQL Server 2005 Administration ISBN: 0-470-05520-0 0 October 12th, 2009 07:15 AM
Try it out:Ch 16 Dataset Example flhartley VB.NET 2002/2003 Basics 1 August 28th, 2009 07:00 AM
Chapter 16 code samples freiZimmer BOOK: Professional Microsoft Robotics Studio ISBN: 978-0-470-14107-6 1 October 9th, 2008 02:24 PM
Ch 16 Bulletin Board Code Problem bigkevracer BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 2 March 10th, 2008 02:52 PM

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