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 April 1st, 2019, 09:30 PM
Authorized User
 
Join Date: Mar 2019
Posts: 11
Thanks: 1
Thanked 0 Times in 0 Posts
Angry Chapter 11 - NOTHING is working!

I'm having nothing but fits so far with this chapter. I try making the UPdatePanel page and there is no "unclickable gray area." When I enter the code in the first TryItOut and try to run, I get a message

Severity Code Description Project File Line Suppression State
Error 'Demos_$safeitename$' is not a valid value for attribute 'inherits'. D:\ASP.NET Websites\BegASPNET\Site\Demos\UpdatePanel.aspx 1

And it tells me that "Label1" is not declared...
Severity Code Description Project File Line Suppression State
Error BC30451 'Label1' is not declared. It may be inaccessible due to its protection level. Site D:\ASP.NET Websites\BegASPNET\Site\Demos\UpdatePanel.aspx.vb 6 Active

I finally gave up and copied-and-pasted the code from the Source folder and I'm still getting those errors. It's like nothing is working the way the book says it's supposed to. It probably will if I just copy the whole files over, but what's the use in that??
 
Old April 1st, 2019, 09:32 PM
Authorized User
 
Join Date: Mar 2019
Posts: 11
Thanks: 1
Thanked 0 Times in 0 Posts
Default

So then I give up and just copy the files from the source folder and when I request UpdatePanel.aspx I get

Server Error in '/' Application.
The control with ID '' requires a ScriptManager on the page. The ScriptManager must appear before any controls that need it.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.InvalidOperationException: The control with ID '' requires a ScriptManager on the page. The ScriptManager must appear before any controls that need it.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[InvalidOperationException: The control with ID '' requires a ScriptManager on the page. The ScriptManager must appear before any controls that need it.]
System.Web.UI.UpdatePanel.get_ScriptManager() +190
System.Web.UI.UpdatePanel.RegisterPanel() +89
System.Web.UI.UpdatePanel.OnInit(EventArgs e) +20
System.Web.UI.Control.InitRecursive(Control namingContainer) +139
System.Web.UI.Control.InitRecursive(Control namingContainer) +312
System.Web.UI.Control.InitRecursive(Control namingContainer) +312
System.Web.UI.Control.InitRecursive(Control namingContainer) +312
System.Web.UI.Control.InitRecursive(Control namingContainer) +312
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +408
 
Old April 2nd, 2019, 03:13 AM
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,

Take a look at this:

Code:
Severity	Code	Description	Project	File	Line	Suppression State
Error	'Demos_$safeitename$' is not a valid value for attribute 'inherits'.	D:\ASP.NET Websites\BegASPNET\Site\Demos\UpdatePanel.aspx	1
That seems to suggest you have an issue with your new page you created from the Add New dialog. Looks like something got messed up earlier in the book.

Chapter 6, page 212, section "Creating Reusable Page Templates" shows you how to create your own templates using the $safeitename$ placeholders. Maybe stuff got messed up there? You could redo the exercise to make sure you have the right template as a starting point. You can also use the ZIP files supplied with the book (under Csharp\Resources\Chapter 06) but those will only work when you followed the book exactly. so you're probably better off building your own templates.

Hope this helps and let me know if it doesn't.

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!
The Following User Says Thank You to Imar For This Useful Post:
servo75 (April 5th, 2019)





Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 14: All.aspx not working p2psd BOOK: Beginning ASP.NET 4.5 : in C# and VB 4 June 13th, 2014 07:56 PM
Chapter 11 not working opaco BOOK: Professional XMPP Programming with JavaScript and jQuery 3 March 20th, 2012 12:53 AM
Working through Chapter 1 Geoffrey Chambers BOOK: Beginning SharePoint 2007: Building Team Solutions with MOSS 2007 ISBN: 978-0-470-12449-9 1 January 2nd, 2010 11:38 PM
Chapter 1, First App, No, it's not working redthor BOOK: Beginning Ruby on Rails 2 February 1st, 2007 08:32 PM
CHAPTER 18 example not working also! diegoborgh BOOK: Beginning JavaServer Pages 0 May 26th, 2005 11:16 PM





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