MCTS Self-Paced Training Kit (Exam 70-515): Web Applications Development with Microsoft® .NET Framework 4

Errata for MCTS Self-Paced Training Kit (Exam 70-515): Web Applications Development with Microsoft® .NET Framework 4




The errata list is a list of errors and their corrections that were found after the product was released. If the error was corrected in a later version or reprint the date of the correction will be displayed in the column titled "Date Corrected".

The following errata were submitted by our customers and approved as valid errors by the author or editor.

Color Key: Serious Technical Mistake Minor Technical Mistake Language or formatting error Typo Question Note Update



Version Location Description Submitted By Date Submitted Date Corrected
PDF
Page xxviii
Using the Companion Media

The Practice Tests are missing from the companion CD zip file. Please check the available file to include this information (Kind of urgent for people already using the book). Thanks

Anonymous  Jan 24, 2011  Mar 02, 2012
PDF
Page 1

Practice Test, XPS books, PDF books missing please fix soon. VERY URGENT!!!

Anonymous  Jan 26, 2011  Jan 02, 2002
PDF
Page 1
zip file

The practice exams are missing on the zip download ? Please post a new zip file so I can take the practice exams. Thank You

Note from the Author or Editor:
Could we get the customer's contact information so we can send the practice tests? Thanks, Ken Jones kjones@oreilly.com

Anonymous  Feb 13, 2011  Mar 02, 2012
Printed
Page 1
Question ID 515P_4.1_05

Practice test Question ID 515P_4.1_05 is missing the code exhibit. One cannot answer the question without the code exhibit.

Note from the Author or Editor:
I submitted the code exhibit; must have been lost in production. Please add. <configuration> <connectionStrings> <add name="SqlServices" connectionString="Data Source=localhost;Initial Catalog=aspnetdb;Integrated Security=SSPI;" /> </connectionStrings> <system.web> <authentication mode="Forms" > <forms loginUrl="login.aspx" name=".ASPXFORMSAUTH" /> </authentication> <authorization> <deny users="?" /> <allow roles="Administrators" /> <deny users="*" /> </authorization> <membership defaultProvider="AspNetSqlProvider" userIsOnlineTimeWindow="15"> </membership> <roleManager defaultProvider="SqlProvider" enabled="true" cacheRolesInCookie="true" cookieName=".ASPXROLES" cookieTimeout="30" cookiePath="/" cookieRequireSSL="true" cookieSlidingExpiration="true" cookieProtection="All" > <providers> <clear /> <add name="SqlProvider" type="System.Web.Security.SqlRoleProvider" connectionStringName="SqlServices" applicationName="SampleApplication" /> </providers> </roleManager> </system.web> </configuration>

Anonymous  Jun 06, 2011 
Other Digital Version
1
Question ID 515P_4.8_01

Practice Test Question ID: 515P_4.8_01 is missing the code exhibit. Unable to answer the question without the code exhibit.

Note from the Author or Editor:
I submitted the screenshot with the practice test question; it must have been lost somewhere in production.

Anonymous  Jun 10, 2011 
PDF
Page 4
3rd ordered item

It should be "If the content requires authentication..." not authorization

Note from the Author or Editor:
Go ahead and make this change.

Miodrag Zivkovic  Dec 21, 2010  Feb 01, 2011
Printed
Page 13
9 and 10 bullets

The text reads "Press Ctrl+[ to return to the Telnet prompt." The actual command is Ctrl+]

Note from the Author or Editor:
Please change [ to ] as described

Siva Chinta  Apr 17, 2011  Aug 19, 2011
PDF
Page 19
9th line of text.

IIS is not required when you are developing ASP.NET applications with Visual Studio, however, because Visual Studio... -> Delete "however, " IIS is not required when you are developing ASP.NET applications with Visual Studio, because Visual Studio includes a lightweight ASP.NET development server.

Note from the Author or Editor:
This is valid. Reprints editor, please make this change.

Anonymous  Jan 24, 2011  Mar 01, 2011
PDF
Page 20
8th Line of text

Microsoft does not support Front Page Server Extensions on IIS 7.5 and Windows Server 2008 R2, however. Therefore, you... -> Delete "however. " Microsoft does not support Front Page Server Extensions on IIS 7.5 and Windows Server 2008 R2, therefore, you cannot create a new website that uses the HTTP deployment capabilities of Visual Studio on the most recent Microsoft server operating systems.

Note from the Author or Editor:
This is valid; please make this change.

Anonymous  Jan 24, 2011  Mar 01, 2011
Printed, PDF
Page 25
1st line of code sample

Sample of Visual Basic Code <%@ Page Language="VB" AutoEventWireup="true" CodeFile="Code-behind.aspx.cs" should be Sample of Visual Basic Code <%@ Page Language="VB" AutoEventWireup="true" CodeFile="Code-behind.aspx.vb"

Note from the Author or Editor:
Valid; we need to make this change.

Paul Salmon  Dec 20, 2010  Feb 01, 2011
PDF
Page 29
Pakistan

The companion media for this book has a size of 80+MB but when i tried to install the Practice Tests through the 'Practice Test'link, I got an error that the Setup.exe file is missing. Please provide the required files for the Practice Tests. Thanks and regards

Note from the Author or Editor:
Fixed per O'Reilly.

Anonymous  Dec 26, 2010  Mar 02, 2012
PDF
Page 31
Lesson Summary, second paragraph

ASP web forms separate the HTML layout from the .NET Framework code. Should be: ASP.NET web forms separate the HTML layout from the .NET Framework code.

Note from the Author or Editor:
Valid, please change as described.

Jay Jay  Sep 30, 2011  Mar 02, 2012
PDF
Page 44
3rd sentence in the last paragraph

In "To enable pages to insert content into a master page, you must add one or more ContentPlaceHolder controls to the content page.", it should be used 'Content controls to the content page' or 'ContentPlaceHolder controls to the master page'.

Note from the Author or Editor:
Correct, it should be "ContentPlaceHolder controls to the master page"

Miodrag Zivkovic  Dec 23, 2010  Feb 01, 2011
Printed
Page 47 & 58
lesson summary point 3

book states: add standard web forms to your site but select the select master page check box when creating the page. VS2010 has the option of selecting Web Form Using Master Page which should be used instead of a standard page. The checkbox option is no longer available in VS2010 Ultimate. note to Author: if you are going to rip from prior versions of the book, the least you can do is proof read and update changes where necassary between versions.

Note from the Author or Editor:
Yes, the UI varies for Web Sites and Web Applications (grr). Please update that bullet point to read, "To add a content page to a Web Site project, add a Web Form and select the Select Master Page check box. To add a content page to a Web Application project, add a Web Form Using Master Page class. You then add content to the page inside the content area defined by the master page." Additionally, on page 47, please change the first paragraph to read: "To add a content page to a Web Site project, select the Select Master Page check box in the Add New Item dialog box. To add a content page to a Web Application project, select Web Form Using Master Page from the Add New Item dialog box. Both methods allow you to select a master page for your ASPX page. Alternatively, you can associate an ASPX page to a master page by using the MasterPageFile attribute in the @ Page directive."

william Crawley  Mar 03, 2011  Mar 01, 2011
Printed
Page 48
2nd paragraph

In the text it discusses the masterPageFile property of the <pages> element and notes that it is case-sensitive, but in the example it has <pages MasterPageFile = "~MySite.Master" /> Shouldn't that be masterPageFile?

Note from the Author or Editor:
On page 48, please change "masterPageFile" to "MasterPageFile" in the 2nd paragraph.

Dorothy Lee  Oct 08, 2011  Mar 02, 2012
Printed
Page 48
Second paragraph -

By default, Visual Studio configures ... <%@ Page Language="VB" MasterPageFile="MySite.Master" %> ,but by default VS2010 configures only with virtual path <%@ Page Language="VB" MasterPageFile="~/MySite.Master" %> and too (page #48) In a Web.config <pages MasterPageFile="MySite.Master" /> - don't work only with virtual path <pages MasterPageFile="~/MySite.Master" />

Note from the Author or Editor:
Valid point, please change both instances as described.

Anonymous  Jan 13, 2011  Feb 01, 2011
Printed, PDF
Page 51
3rd paragraph

The Label Control should be named LabelBrand not Brand in other to justify both codes written below on this page. Or you should replace the LabelBrand with Brand in the sample codes. Thank you

Note from the Author or Editor:
On page 51, please change "updating a Label control named Brand in the master page" to "updating a Label control named LabelBrand in the master page".

Oluwafemi Otusanya  Feb 10, 2012  Mar 02, 2012
PDF
Page 54
Exercise 1 Item 4.

Figure 2-3 at the end of item 4 shows a nicely formatted menu with a logo, real item names, and title. Following the instructions above figure 2-3 does not result in the same look. There is no image, no title, and no item names. In short, there is information missing concerning adding the menu to the master page.

Note from the Author or Editor:
Step 2 instructs the reader to copy the logo, and Step 4 instructs the reader to add a menu bar. We can clarify that the formatting is not covered in detail, however, by changing the first sentence of step 4 to be, "Purely for practice, add a menu bar to your master page and format it nicely." Change the last sentence to read, "Your page's structure should resemble the one in Figure 2-3, though it does not need to look exactly like it."

Richard White  Dec 23, 2010  Feb 01, 2011
PDF
Page 54
Complete Exercise 1

Error is in the physical book description of the exercise is incomplete. The contoso.gif file has to be included into the project The colorful-site has to be included into the project

Note from the Author or Editor:
These files are on the CD, but we should make it easier for the reader to find them. On the CD, please copy these files: \Sample Files\Chapter02\Lesson1-Exercise1-Completed-CS\Styles\Colorful-Site.css \Sample Files\Chapter02\logo\Contoso.gif to: \Sample Files\Chapter02\Sample Files\ Editors: If you can't update the CD, then please update Step 2 on page 54 to read: Copy the Contoso logo to the root folder of your website from the the companion CD (\Sample Files\Chapter02\logo\Contoso.gif). Copy the style sheets (Site.css and Colorful-Site.css in the \Sample Files\Chapter02\Lesson1-Exercise1-Completed-CS\Styles\ folder on the companion CD) to the Styles subfolder of your website.

Hans Sijben  Feb 21, 2011  Mar 01, 2011
Printed
Page 56
1st paragraph

"Add code to the ButtonSubmit_Click method" should read "Add code to the OKButton_Click method". Also, on page 54 when detailing what to put on the master page it would be helpful to state that you need to add a label control named "Greeting Label". It is referenced with that name in the code samples on page 56 (item 9) but the instructions in item 9 call it LabelWelcome.

Note from the Author or Editor:
On page 54, step 3, after the first sentence, please add, "Add a label control named GreetingLabel." On page 56, step 9, please change "LabelWelcome" to "GreetingLabel" On page 56, please change "Add code to the ButtonSubmit_Click method" to "Add code to the OKButton_Click method".

Dorothy Lee  Oct 08, 2011  Mar 02, 2012
PDF
Page 56
Step 9

Instruction 7 b reads: "b. Inside ContentPlaceholderMain, add a TextBox control and name it UserNameTextBox." Sample code under Step 9 reads: "Session["UserName"] = NameTextBox.Text;" NameTextBox and UserNameTextBox should be referring to the same control. Also in the text of step 9 the same textbox is referred to as TextBoxUserName: "Add code to the ButtonSubmit_Click method to determine whether the user provided a value in the TextBoxUserName text box."

Note from the Author or Editor:
In Step 9, page 56, change "TextBoxUserName" to "UserNameTextBox". Also change "NameTextBox" to "UserNameTextBox" in the sample code (under both visual basic and C#).

Paul Salmon  Jan 21, 2011  Mar 01, 2011
Printed
Page 58
Sri Lanka

In step 4 of the Exercise 2, the second sentence says 'Click the Color Scheme list and then click Professional. Then in the last line it says ' The newly loaded page has a yellow header because the page is now using the Colorful.master master page. The second sentence should change to 'click Colorful....'

Note from the Author or Editor:
Valid. Please make the change as described, changing "Professional" in step 4 to "Colorful".

Dinusha De Silva  Dec 26, 2011  Mar 02, 2012
Printed
Page 59
United States

On page 59 for the first bullet item, it should say "MasterPageFile" instead of "Master" in the line " add a master attribute to ..."

Note from the Author or Editor:
Valid. Please change as described.

Anonymous  Oct 15, 2011  Mar 02, 2012
PDF
Page 62
2nd paragraph in 4th Step

Attributes in web.config are case-sensitive: It should be 'theme' ans 'styleSheetTheme', not 'Theme' and 'StyleSheetTheme'.

Note from the Author or Editor:
Valid. Please change "<pages Theme=" to "<pages theme=" and "<pages StyleSheetTheme=" to "<pages styleSheetTheme=".

Miodrag Zivkovic  Dec 24, 2010  Feb 01, 2011
PDF
Page 63
2nd paragraph, 1st bullet point

when describing the location of global themes, the example that you give for .NET 4_0_30319 omits the themes folder from the end of the path: Example: C:\inetpub\wwwroot\aspnet_client\system_web\4_0_30319\ Correct example: C:\inetpub\wwwroot\aspnet_client\system_web\4_0_30319\themes

Note from the Author or Editor:
Valid. Please change as described in the body text of the first bullet point.

Michael Baker  Sep 15, 2011  Mar 02, 2012
PDF
Page 67
steps 2 and 5

Again, attributes in web.config are case-sensitive.

Note from the Author or Editor:
Valid. In step 2, please change "<pages Theme=" to "<pages theme=". In step 5, please change "<pages StyleSheetTheme=" to "<pages styleSheetTheme=".

Miodrag Zivkovic  Dec 24, 2010  Feb 01, 2011
Printed
Page 68
code demo on settign control theme

text talks about changing the theme of a control by setting the skinid, a theme does not directly apply to a control, you can change the skin by changing the skinid but assigning it the name of a theme wont work. http://msdn.microsoft.com/en-us/library/tx35bd89%28v=VS.85%29.aspx

Note from the Author or Editor:
Valid point. On page 68, please change "...you can apply a theme to specific controls" to "...you can apply a skin to specific controls". In the code sample on the bottom of the page, change the two occurrences of "BlueTheme" to "BlueSkin"

Daniel Powell  Jun 30, 2011  Aug 19, 2011
PDF
Page 68
Sample of C# Code

It should be 'protected' instead of 'Protected' in the method declaration

Note from the Author or Editor:
Valid; we should make the change as described.

Miodrag Zivkovic  Dec 24, 2010  Feb 01, 2011
Printed
Page 70
Item 10

It says to set the TextBox control CssClass to "textBox" and the Button control CssClass to "button" - neither of which exist in the Styles.css sheet. I suspect the example was different earlier and included these styles in the Styles.css file but now there is just the body tag. Please review and update the example.

Note from the Author or Editor:
Please change step 7 on page 70 to: 7. Add a style sheet to your Contoso theme and name it Style.css. Within the style sheet, define styles to set the default font family, size, and style for the HTML body and the CSS classes textBox and button. Your style sheet should resemble this: body { font-family : Tahoma; font-size : 10pt; } .textBox { font-style: italic; } .button { font-style: oblique; font-size: 30pt; }

Rob  Feb 07, 2011  Mar 01, 2011
Printed
Page 71
Item 11

Exercise is to use the Fabrikam Theme, which states in item 8, to set the font-family to Script. Figure 2-6 shows the text as non Script.

Note from the Author or Editor:
Browser used to capture screenshot didn't render the script font. You can download an updated screenshot here: http://www.northrup.org/dl/tk70-515/f02xx06-new.bmp

Anonymous  Mar 06, 2011  Aug 19, 2011
Printed
Page 71
point 13

the example given on page 71 shows AutoEventWireup='False' which works for the example at that point. However, by the time the reader reaches point 13 on p72 unless they switch AutoEventWireup to 'True' the example will not work.

Note from the Author or Editor:
On page 71, please change "AutoEventWireup="false"" to "AutoEventWireup="true"".

william Crawley  Mar 08, 2011  Aug 19, 2011
PDF
Page 73
Lesson Summary 3rd bullet

You can't apply a theme at a control level.

Note from the Author or Editor:
Please change the third bullet on page 73 to "You can apply a theme at the page level or at the site level using the Web.config file."

Bhavesh  Dec 18, 2011  Mar 02, 2012
PDF
Page 74
Question 1 Answer C&D

Case-Sensitive: Instead of <pages Theme=”themeName”> and <pages StyleSheetTheme=”themeName”>, it should be <pages theme=... and <pages styleSheetTheme=...

Note from the Author or Editor:
Valid; we need to make the change as described.

Miodrag Zivkovic  Dec 24, 2010  Feb 01, 2011
Printed
Page 78
1st paragraph under 1st C# sample code

The paragraph claims the code example shows a dependency of "SourceFile.xml" but the code shows only references to "SourceFile.txt".

Note from the Author or Editor:
This is correct--please change "SourceFile.xml" to "SourceFile.txt" in the first paragraph.

Fredrik Fahlman  Feb 22, 2011  Mar 01, 2011
Printed, PDF
Page 79
Question 3: What types of data can you store in the Cache collection?

Question 3: What types of data can you store in the Cache collection? Answer: You can store any type of data in the Cache collection. However, when you retrieve the data, you must cast it to the correct type. Answer is incomplete. Correct answer should be: You can store any type of data that is serializable in the Cache collection.

Note from the Author or Editor:
Valid point. Please change: "You can store any type of data in the Cache collection." to "You can store any serializable type of data in the Cache collection."

Mihai D  Mar 22, 2011  Aug 19, 2011
Printed, PDF
Page 79
3rd paragraph

Especially with a sliding cache expiration, it is possible that heavy usage will result in an item never being removed from the cache, preventing updates to the original object from being accessed. By defining an absolute expiration in addition to a sliding expiration, you can be sure an object is eventually removed. When possible, add a cache dependency to your absolute and sliding cache expirations to immediately remove the cached object when the original is updated. "By defining an absolute expiration in addition to a sliding expiration" this is incorrect. Only one of them can be used at any given time. Absolute Expiration or Sliding Expiration. If Absolution Expiration is used, sliding expiration must be set to Cache.NoSlidingExpiration. If Sliding Expiration is used, then absolute expiration must be set to Cache.NoAbsoluteExpiration.

Note from the Author or Editor:
Valid errata. Please remove "in addition to a sliding expiration"

Zaharan Haleed  Jun 06, 2011  Aug 19, 2011
PDF
Page 79
2nd paragraph (above Quick Check)

One can't do what is said in following: "By defining an absolute expiration in addition to a sliding expiration, you can be sure an object is eventually removed.".

Note from the Author or Editor:
Valid--please remove that sentence.

Bhavesh  Dec 20, 2011  Mar 02, 2012
Printed, PDF
Page 79
Quick Check, question 1

Quick Check question 1: How can you cause an object to be automatically invalidated after a specific amount of time? Quick Check answer in book and PDF: 1. Call the Cache.Insert method and provide a dependency. Recommended answer: Call the Cache.Insert method and provide a DateTime object for the absoluteExpiration.

Note from the Author or Editor:
This is a useful clarification.

David Cantrell  Jan 23, 2011  Mar 01, 2011
Printed, PDF
Page 82
Table 2.1, Row 5 - Shared

The Shared Attribute is listed under @ OutputCache for single page. The Shared attribute can only be used in a user control. http://msdn.microsoft.com/en-us/library/hdxfb6cy.aspx

Note from the Author or Editor:
Valid errata. Please remove the "Shared" row from the table.

Zaharan Haleed  Jun 06, 2011  Aug 19, 2011
Printed
Page 82
Table 1.2

pg. 82 Further comment on: Duration - "This is a required parameter." - Parameter is not required if using CacheProfile (as in example on p88)

Note from the Author or Editor:
Valid. Please change, "This is the only required parameter." to "This parameter is required if you are not using CacheProfile."

Fiona Titcombe  Sep 19, 2011  Mar 02, 2012
Printed, PDF
Page 82
Table 2-1

Text reads: Duration - "this is the only required parameter" but later in the table under VaryByParam, it is stated that "Either this attribute or the VaryByControl attribute is required when you use the @ OutputCache directive on ASP.NET pages and user controls. A parser error occurs if you fail to include it." Also, the Microsoft web site http://msdn.microsoft.com/en-us/library/hdxfb6cy.aspx does not say that Duration is the only required parameter. Remove the statement from Duration that this is the only required parameter.

Note from the Author or Editor:
Please change "This is the only required parameter." to "This is a required parameter."

dudeinIL  Jan 31, 2011  Mar 01, 2011
Printed
Page 83
2nd paragraph

The following example demostrates how to chache a page for 15 minutes <%@ OutputCache Duration="15" ... Duration is expressed in second so Correct: The following example demostrates how to chache a page for 15 seconds

Note from the Author or Editor:
Please change from "15 minutes" to "900 seconds".

Paolo Codiga  Jan 30, 2011  Mar 01, 2011
Printed, PDF
Page 84
2nd Para, Response.Cache.SetExpires

Cannot specify seconds to Response.Cache.SetExpires. This method takes a absolute date value.

Note from the Author or Editor:
Valid errata. Please change the definition for the first bullet point to, "Use this method to expire the page at a specific time. For example, you could specify DateTime.Now.AddMinutes(30) to expire the page in 30 minutes."

Zaharan Haleed  Jun 07, 2011  Aug 19, 2011
PDF
Page 90
6th Paragraph

You are modifying the page cache to expire based on a control, however the in the code example directly beloq you are using VaryByParam not VaryByControl as expected.

Note from the Author or Editor:
On page 90, step 10, please change "VaryByParam" to "VaryByControl"

Steven  Sep 09, 2011  Mar 02, 2012
Printed
Page 97
First bullet in bullet list - "View state"

Part of the paragraph says: "For example if a user types an address into a TextBox and view state is enabled, the address will remain in the TextBox between requests". This is not wrong, but it's misleading as the address will remain in the TextBox between requests even if view state is not enabled. Post data is not stored in Viewstate.

Note from the Author or Editor:
Valid point. Please change the specified sentence to: "For example, if view state is enabled and you set the value of a Label control, ASP.NET will retain the custom value between requests."

Andreas Andersen  Jun 18, 2011  Aug 19, 2011
Printed
Page 105
Init Event description

Init event description reads "This event fires after each control has been initialized." This implies that the event fires once per control on the page. I think it should read "This event fires after all the controls have been initialized".

Note from the Author or Editor:
Valid. Please change as described.

Anonymous  Sep 19, 2011  Mar 02, 2012
PDF
Page 105
Table 3-1 PreLoad Event

For the PreLoad event, the book states: "This event fires before view state has been loaded for the page and its controls", however MSDN states that this event is "raised after the page loads view state for itself and all controls." See: http://msdn.microsoft.com/en-us/library/ms178472.aspx

Note from the Author or Editor:
Valid. Please change the description for the InitComplete row to read, "Raised once all initializations of the page and its controls have been completed. This event fires before view state has been loaded for the page and its controls and before PostBack processing. This event is useful when you need to write code after the page is initialized but before the view state has been wired back up to the controls." Please change the description for the PreLoad row to read, "This event fires after view state has been loaded and the page has processed postback data."

Karin Gates  Nov 25, 2011  Mar 02, 2012
Printed
Page 106
Headline

The headline "Creating Custom Controls" seems to be misleading. Should be "Adding controls programmatically".

Note from the Author or Editor:
Please change heading to "Adding Controls at Runtime"

Anonymous  Jun 01, 2011  Aug 19, 2011
PDF
Page 107 & 108
3rd paragraph of c# example code SubmitButton_Click event

Error is in the physical book error or typemismatch on page 108 (Label)Findcontrol("Feedbacklabel"); has to be replaced by: (Label)panel1.Findcontrol("Feedbacklabel"); and TextBox InputTextbox = (TextBox)FindControl("InputTextbox"); has to be replaced by: TextBox InputTextbox = (TextBox)Panel1.FindControl("InputTextbox");

Note from the Author or Editor:
I'm sorry, I couldn't reproduce this error. The code sample worked for me with content pages and standard web forms in both web sites and web applications. Perhaps you could send me a non-working project to tony@northrup.org? However, on pages 107 and 108, I would like to change "Page_PreInit" to "Page_Load".

Hans Sijben  Feb 21, 2011  Mar 01, 2011
Printed, PDF
Page 107 & 108
code sample

This is from the author: Page 107: Dim FeedbackLabel As Label = DirectCast(FindControl("FeedbackLabel"), Label); Dim InputTextBox As TextBox = DirectCast(FindControl("InputTextBox"), TextBox); has to be replaced by: Dim FeedbackLabel As Label = DirectCast(Panel1.FindControl("FeedbackLabel"), Label); Dim InputTextBox As TextBox = DirectCast(Panel1.FindControl("InputTextBox"), TextBox); Page 108: Label FeedbackLabel = (Label)FindControl("FeedbackLabel"); TextBox InputTextBox = (TextBox)FindControl("InputTextBox"); has to be replaced by: Label FeedbackLabel = (Label)panel1.Findcontrol("FeedbackLabel"); TextBox InputTextBox = (TextBox)Panel1.FindControl("InputTextBox");

Note from the Author or Editor:
Yes, please make these changes.

Tony Northrup
Tony Northrup
O'Reilly Author 
Mar 08, 2011  Mar 01, 2011
PDF
Page 113
Quick Check Question #1

Question: 1. Which event would you handle to set the value of a Label control? Answer: 1. Usually, you would handle the Page.Load event. Because other parts of a form probably do not rely on the value of a Label, you could also handle the Page.PreInit, Page.Init, or Page.Render event. Corrections: 1) Page.Render is not an event, it is a method. Perhaps the intention was Page.PreRender? I doubt you would override Page.Render in order to change a Label.Text property. 2) Page.PreInit will not work because the control object is not created yet and you will get a System.NullReferenceException at runtime. 3) I believe the best event is actually the Page.PreLoad event because changing the value of a property of a label control in a Page.Load handler will cause its viewstate to become dirty and unnecessarily bloat the size of the viewstate string in the response and subsequent postbacks. Maybe this is beyond the scope of the book but in that case the question probably uses a bad example.

Note from the Author or Editor:
Very valid points. Answer 1 should read: "Typically, you would handle the Page.Load event. Because other parts of a form probably do not rely on the value of a Label, you could also handle the Page.Init, Page.PreLoad, or Page.PreRender events. If the form did not have a master page, you update the label by handling the Page.PreInit event."

Chris  Feb 24, 2011  Mar 01, 2011
Printed
Page 117
section 4.

use response.redirect("Home.aspx", false); instead or alternative the Server.Execute method instead. See the following KB article 312629 : http://support.microsoft.com/default.aspx?scid=kb;en-us;312629 and also the following P&P guideline: "Write Code That Avoids Exceptions" http://msdn.microsoft.com/en-us/library/ff647787.aspx#scalenetchapt06_topic22

Note from the Author or Editor:
In the Visual Basic code, change: Reponse.Redirect("Home.aspx") to: Reponse.Redirect("Home.aspx", False) In the C# code, change: Reponse.Redirect("Home.aspx"); to: Reponse.Redirect("Home.aspx", false);

Jon Wiberg  Jul 15, 2011  Aug 19, 2011
Printed
Page 123
3rd paragraph

Clarify hashing and viewstate and the use of viewstate MAC, mention base64. As it reads out now is in my opinion misleading. The viewstate is in fact 1:st serialized to base64, and a hash added to the encoded viewstate. http://msdn.microsoft.com/en-us/library/ms972976.aspx The Cost of View State "1.On all page visits, during the save view state stage the Page class gathers the collective view state for all of the controls in its control hierarchy and serializes the state to a base-64 encoded string. " http://msdn.microsoft.com/en-us/library/ms178199(v=vs.85).aspx Securing View State Data on the Page "By default, view state data is stored on the page in a hidden field and is encoded using base64 encoding. In addition, a hash is created from the data using a machine authentication code (MAC) key. The hash value is added to the encoded view state data and the resulting string is stored on the page. When the page is posted back to the server, the ASP.NET page framework re-hashes the view state data and compares the hash with the hash stored previously in the page. If the hash does not match, an exception is raised indicating that view state data might be invalid."

Note from the Author or Editor:
On page 124, change the paragraph from: "For most situations, you can rely on the fact that view state is hashed and encoded before being sent to the user’s browser. The view state also includes a message authentication code (MAC). This MAC is used by ASP.NET to determine if the view state has been tampered with. This helps ensure security in most situations without having to go to a fully encrypted view state." to: "The view state also includes a message authentication code (MAC). This MAC is used by ASP.NET to determine if the view state has been tampered with. This helps ensure security in most situations without having to go to a fully encrypted view state. For most situations, you can rely on the fact that view state and MAC are base64 encoded and then hashed before being sent to the user’s browser. "

Jon Wiberg  Jul 15, 2011  Aug 19, 2011
Printed
Page 125
3rd paragraph

It reads "By default, Page.EnableViewState is Enabled...". However, Page.EnableViewState can only be set to true or false. Should be "By default, Page.ViewStateMode is Enabled...".

Note from the Author or Editor:
Please change "By default, Page.EnableViewState is Enabled...". to "By default, Page.EnableViewState is True...".

Anonymous  Jun 01, 2011  Aug 19, 2011
Printed, PDF
Page 135

On page 135 in the sample code for both Visual Basic and C# the 1st parameter of the string.Format suggests that 3 additional parameters will follow ("User: {0}, Lang: {1}, Page: {2}"), however only 2 are supplied. I.e. something like 'Server.HtmlEncode(Request.QueryString["page"])' is missing.

Note from the Author or Editor:
Please change the sample code to: Sample of Visual Basic Code Label1.Text = String.Format("User: {0}, Lang: {1}, Page: {2}", _ Server.HtmlEncode(Request.QueryString("user")), _ Server.HtmlEncode(Request.QueryString("lang")), _ Server.HtmlEncode(Request.QueryString("page"))) Sample of C# Code Label1.Text = string.Format("User: {0}, Lang: {1}, Page: {2}", Server.HtmlEncode(Request.QueryString["user"]), Server.HtmlEncode(Request.QueryString["lang"]), Server.HtmlEncode(Request.QueryString["page"])); //C# Label1.Text = "User: " + Server.HtmlEncode(Request.QueryString["user"]) + ", Lang: " + Server.HtmlEncode(Request.QueryString["lang"]) + ", Page: " + Server.HtmlEncode(Request.QueryString["page"]);

Daniil Shteynberg  Feb 14, 2011  Mar 01, 2011
PDF
Page 153
Point 4

CHANGE "Page_Load event" TO "Page_Load method" Context: CHANGE "code shows how your Page_Load event should now look" TO "code shows how your Page_Load method should now look"

Note from the Author or Editor:
Valid, please change as described.

Per Hygum Due  Feb 18, 2012  Mar 02, 2012
PDF
Page 158
First Section, Under the Practice 1 Bullet

The bullet reads as below: &#9632; Practice 1 Create a custom control and implement control state management. The request seems simply enough, but given the progression of the chapters, this objective is not achievable with the content covered by the end of Chapter 3. The preceding chapter does not even discuss how to implement State Management or how to create and custom control. Readers familiar with either of these tasks would not have an issue, but less experienced .NET developers would find this out of place.They may find themselves thinking they missed something when in reality it was not covered by this point in the book. It seems more on Control State in the chapter is needed, with some examples including custom control creation, or a move of this practice objective to Chapter 8 where it would be covered.

Note from the Author or Editor:
Valid. Please change the first Practice 1 on page 158 to just read, "Create a custom control."

Joshua Greisen  Oct 28, 2011  Mar 02, 2012
Printed, PDF
Page 163
end of page

The book states: "if you use the Button web server control, ASP.NET renders it using the <button> HTML markup tag". Nope, it doesn't. Asp.NET renders an <asp:Button runat="server" /> as an <input type="submit" />

Note from the Author or Editor:
Valid point. Please change this sentence: "... if you use the Button web server control, ASP.NET renders it using the <button> HTML markup tag." to: "... if you use the Image web server control, ASP.NET renders it using the <img> HTML markup tag."

Moreno Gentili  Jan 05, 2011  Feb 01, 2011
Printed
Page 167
The Label Control, step 4

It reads "Set the Label.AssociatedControlID property to the ID of the label control". But it should be "Set the Label.AssociatedControlID property to the ID of the input control".

Note from the Author or Editor:
Please change as described

Bart Koot  Apr 22, 2011  Aug 19, 2011
Printed
Page 170
C# Code example

Sample C# code as is will not work. Verbatim symbol @ must also be placed in front of the 2nd set of strings in the concatenations. Please change current code sample: Literal1.Text =@"This is an <font size=7>example</font>"+ "<script>alert(""Hi from Literal1"");</script>"; Literal2.Text =@"This is an <font size=7>example</font>"+ "<script>alert(""Hi from Literal2"");</script>"; Literal3.Text =@"This is an <font size=7>example</font>"+ "<script>alert(""Hi from Literal3"");</script>"; Literal1.Mode = LiteralMode.Encode; Literal2.Mode = LiteralMode.PassThrough; Literal3.Mode = LiteralMode.Transform; Correct Code sample should read: Literal1.Text =@"This is an <font size=7>example</font>"+ @"<script>alert(""Hi from Literal1"");</script>"; Literal2.Text =@"This is an <font size=7>example</font>"+ @"<script>alert(""Hi from Literal2"");</script>"; Literal3.Text =@"This is an <font size=7>example</font>"+ @"<script>alert(""Hi from Literal3"");</script>"; Literal1.Mode = LiteralMode.Encode; Literal2.Mode = LiteralMode.PassThrough; Literal3.Mode = LiteralMode.Transform;

Note from the Author or Editor:
Valid errata--just a problem introduced when formatting the code sample for print. Please add the @ symbols as described.

Kyle Clubb  Jun 01, 2011  Aug 19, 2011
Printed
Page 178
2nd bullet point

From "... JavaScript attached to the its events", remove "the".

Note from the Author or Editor:
Valid errata. Please make the change as described.

Anonymous  Jun 01, 2011  Aug 19, 2011
PDF
Page 178
2nd paragraph

In 2nd bullet point, it says, "When the control needs to have custom client-side JavaScript attached to the its events." There is an extra 'the' after 'attached to'. This is not right. This has to be removed.

Note from the Author or Editor:
Valid, please correct as described.

C S Prashanth  Dec 13, 2011  Mar 02, 2012
Printed
Page 179
line 12-13

If you remove the runat="server" attribute the generated value of id can change (example: use a master page). Not removing the ID attribute is not enough; you have to change it.

Note from the Author or Editor:
Replace the sentence, "If the HTML element is referenced by client-side script, you should not remove its ID attribute." with "If the HTML element is referenced by client-side script, verify that ASP.NET has not changed its ID attribute in the rendered HTML."

Jeroen  May 03, 2011  Aug 19, 2011
Printed
Page 184
source code

In the string.Format command there is an "_" in place for a line continuation. This is incorrect syntax for C# and should be removed.

Note from the Author or Editor:
Remove the underscore and indent the previous line to be 4 spaces beyond the string.Format line.

Anonymous  Apr 07, 2011  Aug 19, 2011
Printed, PDF
Page 188
steps

Printed: in the step 2 says "add PreInit event to the page" and the samples codes are coded into the Page_Load (which is correct) PDF: as in the printed edition in the step two says add "PreInit" but here both sample codes are coded in PreInit which is incorrect

Note from the Author or Editor:
This problem only occurs when using master pages. However, since Page_Load is more universal, we should use that event handler instead, as the reader suggests. Please change every instance of the phrase "PreInit" to "Load" on pages 188 and 189, including those in the code sample.

Juan David Castaneda  Jul 20, 2011  Aug 19, 2011
PDF
Page 188 & 189
Source Code

In the source code the cells of the Table control are created and added to the Table, however as the initialization of the Table should not work in the Page_PreInit method because the controls are not still initialized at this point. That is why the code should the run in the Page_Init or in the Page_Load method. Is is correct? Best regards, Omar Diego

Note from the Author or Editor:
You're right, we need to change "Page_PreInit" on both pages 188 and 189 to "Page_Load".

Omar Diego Vera Ustariz  Dec 13, 2010  Feb 01, 2011
Printed
Page 190
1st paragraph

the image url does not map to the href item of the img tag. This does not exsist. that is a <a href. The image tag uses <img src="" to locate the image

Note from the Author or Editor:
Sorry about that. Please change "href attribute" to "src attribute".

Jamie Macdonald  Feb 21, 2011  Mar 01, 2011
Printed
Page 191
3rd

At the end of the 3rd paragaraph of "The ImageButton Control" section, it is listed that GenerateEmptyAlternateText is a property of ImageButton. However, it is NOT.

Note from the Author or Editor:
This is valid. Please remove GenerateEmptyAlternateText from that sentence.

Anonymous  Dec 30, 2010  Feb 01, 2011
PDF
Page 197
3 Paragraph

In Dec 30, 2010 Oraily Recive Submit Errata For This case But steal In That Errata Is problem , Correct IS : DAY DayWeek (In Book And Errata Is Week) DayWeekMonth (In Book IS WeekMonth but Errata catch It) None (in Book Is One But errata catch It)

Note from the Author or Editor:
This suggestion is valid. Please change the terms for the four bullet points as suggested, to "Day", "DayWeek", "DayWeekMonth", and "None". The definitions are OK.

Ali Azhdari  Jun 13, 2011  Aug 19, 2011
Printed
Page 197
3rd

SelectionMode of Calendar Control should be: Day Week DayWeekMonth (Not WeekMonth) None (Not one)

Note from the Author or Editor:
Correct, please update accordingly.

Anonymous  Dec 30, 2010  Feb 01, 2011
Safari Books Online
201
Last paragraph

The text references a GetSchedule method, even though no such method exists in the code example. It must have been removed at some stage to simplify the example since the collection is now populated on Page_Load.

Note from the Author or Editor:
Correct. The first sentence of the paragraph should read, "This code adds dates to the calendar and then sets the Calendar control properties, such as style and size, in the Page_Load event handler." We should remove the sentence, "A method called GetSchedule is added to populate a collection of special dates." Thanks for catching that!

crótach  Jan 18, 2011  Feb 01, 2011
Printed
Page 205
3rd paragraph

There is a list of the panel control's properties. The property DefaultButton is listed twice (but description in the second case is something different). In fact I don't know what the correct property name would be for it's description.

Note from the Author or Editor:
Please remove the last bullet point. (Just a copy/paste error, probably)

Anonymous  Feb 18, 2011  Mar 01, 2011
Printed
Page 220
Step 15

The 2nd sentence of the step reads "Add code to this event to place the PostBackValue from the ImageMap event arguments into the Label1 control". "Label1" should be replaced with "OfficeSelectedLabel" in order to match the ID specified in Step 9.

Anonymous  Apr 12, 2011  Aug 19, 2011
PDF
Page 222
last code segment on the page

a dot is missing after {1}",OfficeSelectedLabel SummaryLabel.Text = string.Format("Summary info:<br />Room: {0}<br />Delivery Date: {1}",OfficeSelectedLabelText,ServiceDateCalendar.SelectedDate.ToShortDateString()); should be: SummaryLabel.Text = string.Format("Summary info:<br />Room: {0}<br />Delivery Date: {1}",OfficeSelectedLabel.Text,ServiceDateCalendar.SelectedDate.ToShortDateString());

Note from the Author or Editor:
Thanks for catching that. We should make this change as described.

Hans Sijben  Feb 24, 2011  Mar 01, 2011
Printed
Page 224
Question 1, option B

The marked answer to the question from page 224 is wrong. Surely if you wanted to display data from a collection in a grid you would use GridView and not a cumbersome collection of table controls. I believe D fits much better, the answer why this is incorrect on page 892 makes no sense, if controls are added programatically then you can't add them to a <div> or a <span>.

Note from the Author or Editor:
On Page 224, question 1 answer B, please change it to read, "Displaying data in a grid format" instead of "Displaying data from a collection in a grid format."

crótach  Jan 18, 2011  Feb 01, 2011
Printed
Page 233
last paragraph

The ControlToCompare is the rhs (right hand side) of the comaprison. So if you want the second defined date to be later than the first, then make one of the following changes to the text: 1) "set its ControlToValidate property to the first date entry text box, and its ControlToCompare property to the second date entry text box." or 2) "set its ControlToCompare property to the second date entry text box, and its ControlToValidate property to the first date entry text box." or 3) "You would then set the Operator property to LessThanEqual."

Note from the Author or Editor:
Please change the last sentence to option #3 presented above.

Anonymous  Apr 27, 2011  Aug 19, 2011
Printed
Page 249
2nd code segment on the page

Suggested textual correction is wrong. Change only this: <%@ PreviousPageType VirtualPath="~/DataCollection.aspx" %>

Note from the Author or Editor:
Please change <%@ PreviousPageType VirtualPath="~/ProcessingPage.aspx" %> to <%@ PreviousPageType VirtualPath="~/DataCollection.aspx" %>

Jeroen  May 03, 2011  Aug 19, 2011
Safari Books Online
249
2nd code segment on the page

Should have been DataCollection.aspx and not the ProcessingPage. <%@ PreviousPageType VirtualPath="~/ProcessingPage.aspx" %> Please check , http://msdn.microsoft.com/en-us/library/ms178139.aspx

Note from the Author or Editor:
Correct, please change, "The processing page contains a Label control..." to "The DataCollection.aspx page contains a Label control..."

FAISAL RAFIQUE  Jan 05, 2011  Feb 01, 2011
Printed
Page 251
Sample code vb and C#

Don't use Server.Transfer instead use the Server.Execute method instead. See the following KB article 312629 : http://support.microsoft.com/default.aspx?scid=kb;en-us;312629 and also the following P&P guideline: "Write Code That Avoids Exceptions" http://msdn.microsoft.com/en-us/library/ff647787.aspx#scalenetchapt06_topic22

Note from the Author or Editor:
Server.Execute does something different--it continues running the original page, basically inserting the page into the original pages contents. So, we need to use Server.Transfer. In the official introduction to Server.Transfer (on page 251), I'd like to change the code sample from: Sample of Visual Basic Code ' VB Protected Sub Button1_Click(ByVal sender As Object, _ ByVal e As System.EventArgs) Handles Button1.Click Server.Transfer("~/OrderProcessing.aspx", False) End Sub //C#Sample of C# Code protected void Button1_Click(object sender, EventArgs e) { Server.Transfer("~/OrderProcessing.aspx", false); } to: Sample of Visual Basic Code Protected Sub Button1_Click(ByVal sender As Object, _ ByVal e As System.EventArgs) Handles Button1.Click Try Server.Transfer("~/OrderProcessing.aspx", False) Catch ex As System.Threading.ThreadAbortException ' Ignore Server.Transfer exception End Try End Sub Sample of C# Code protected void Button1_Click(object sender, EventArgs e) { try { Server.Transfer("~/OrderProcessing.aspx", false); } catch (System.Threading.ThreadAbortException ex) { // Ignore Server.Transfer exception } } Immediately after the code sample, please add this paragraph: Notice that the code sample catches a ThreadAbortException after calling System.Transfer. While you should typically avoid handling exceptions without processing them, calling Server.Transfer always results in the .NET Framework throwing a ThreadAbortException. The code works if you do not catch the exception, however, the uncaught exception incurs a slight performance penalty.

Jon Wiberg  Jul 15, 2011  Aug 19, 2011
Printed
Page 252
Last paragraph

NavigationMenu is listed as one of the common ASP.NET navigation controls - this should just be Menu (not NavigationMenu).

Note from the Author or Editor:
Correct; please change "NavigationMenu" to "Menu"

Rob Shattock  Mar 05, 2011  Aug 19, 2011
Printed
Page 257
Exercise Step 1

Chapter 5, Lesson 2 (Working with Site Navigation) exercise step 1… Open Visual Studio and create new ASP.NET Empty Web Site project … should be changed to read … Open Visual Studio and create new ASP.NET Web Application … because steps in the exercise expect certain dependencies that are not available when using the ASP.NET Empty Web Site method. For example, step 4 suggests to open the Site.master file, but this file does not exist if using a ASP.NET Empty Web Site project. It does exist if using a ASP.NET Web Application.

Note from the Author or Editor:
Valid. Please change as described.

Barron Anderson  Nov 06, 2011  Mar 02, 2012
Printed, PDF
Page 258
1st paragraph

There is no ASP.NET NavigationMenu control, only a Menu control (which happens to have an ID of NavigationMenu in the default Site.master page). Consider rewording as "4. Open the Site.master page. Remove the default Menu control." (to remove any confusion as to the correct class).

Note from the Author or Editor:
Please change as described

Rob Shattock  Mar 05, 2011  Aug 19, 2011
Printed
Page 258
First line

Remove (not Remote) the default NavigationMenu control.

Note from the Author or Editor:
Correct, this was a typo.

Anonymous  Dec 31, 2010  Feb 01, 2011
Safari Books Online
268
C# sample code (ButtonEdit_Click method)

The first time the user clicks the button the page ViewState["mode"] will be empty, and nothing will happen. They will need to click the button twice in order for the functionality to kick-in. To make this work you could do it the other way around and check if the mode is already set to "edit", otherwise enter the Catalog display mode. For example: protected void ButtonEdit_Click(object sender, EventArgs e) { string mode = (string)ViewState["mode"]; if (mode == "edit") { ViewState["mode"] = "browse"; ButtonEdit.Text = "Edit"; WebPartManager1.DisplayMode = WebPartManager1.SupportedDisplayModes["Browse"]; } else { ViewState["mode"] = "edit"; ButtonEdit.Text = "Done"; WebPartManager1.DisplayMode = WebPartManager1.SupportedDisplayModes["Catalog"]; } }

Note from the Author or Editor:
Please change the first paragraph of page 268 to read: The next step is to put the page into this display mode when the user clicks the Edit button. The following shows the code for the button's click event, and assumes that you added a string named mode with a value of browse to view state the first time the page loaded.

crótach  Feb 02, 2011  Mar 01, 2011
Safari Books Online
270
C# sample code

Both consumer and provider methods need to be made public, otherwise the WebPart connection between the two doesn't work. Namely: public void ShowTextBoxValue(string textBoxValue) public string GetTextBoxValue() instead of: void ShowTextBoxValue(string textBoxValue) string GetTextBoxValue()

Note from the Author or Editor:
On page 270, in the first code sample, in C#, change "string GetTextBoxValue()" to "public string GetTextBoxValue()" In the second code sample, in C#, change "void ShowTextBoxValue(string textBoxValue)" to "public void ShowTextBoxValue(string textBoxValue)".

crótach  Feb 02, 2011  Mar 01, 2011
Printed
Page 275
C# Code sample at top of page

Simply change "Return _postalCode;" to "return _postalCode;"

Rob Shattock  Mar 06, 2011  Aug 19, 2011
Printed
Page 278
List Item 7.

The second last sentence of Item 7 says "Notice that if you close a control you cannot reopen it without rerunning the site.". My understanding (and what I found out when I tried closing one of the Web Parts) was that due to personalization the Web Part will not redisplay simply by rerunning the site. If you choose close then it can only be restored while being in catalog mode. Please confirm if my understanding is correct and if so consider updating this (and perhaps warning your readers not to close any Web Parts until later in the exercise when the CatalogZone has been added so that the closed Web Parts can be re-added). Thanks.

Note from the Author or Editor:
In step 7, please change "rerunning the site" to "clearing the personalization data"

Rob Shattock  Mar 06, 2011  Aug 19, 2011
Printed
Page 279
Step 5

"Next, add a using statement" should be changed to "Next, add a using directive" Using statement is something different and is misleading in this step.

Note from the Author or Editor:
Please change as requested.

Kyle Clubb  May 26, 2011  Aug 19, 2011
Printed
Page 286
Step 10

The step currently reads "Run Default.aspx in your web browser." The step should read "Run Default2.aspx in your web browser." in order to view the correct page.

Anonymous  Apr 18, 2011  Aug 19, 2011
Printed
Page 288
2nd paragraph

This question could be more clear regarding the Username. There is no mention of the e-mail adress being the same as the Username, thus the first question becomes unclear.

Note from the Author or Editor:
Change "user name" in step 1 to "email address"

Fredrik Fahlman  Mar 08, 2011  Aug 19, 2011
Safari Books Online
304
Bullet #3: size elements relative to the overall size of the form

The text advocates use of CSS expressions that were proprietary to Internet Explorer and in fact no longer supported as of 2008 in versions of IE 8 and up. http://blogs.msdn.com/b/ie/archive/2008/10/16/ending-expressions.aspx

Note from the Author or Editor:
Valid concern. Please remove bullet 3.

Andras Vass  Jan 09, 2011  Feb 01, 2011
Printed
Page 306
Line above the Note.

You say "By default, Visual Studio defines the UICulture and Culture page attributes as auto." but MSDN doesn't mention any default: http://msdn.microsoft.com/en-us/library/ydy4x04a.aspx http://msdn.microsoft.com/en-us/library/system.web.ui.page.culture.aspx http://msdn.microsoft.com/en-us/library/system.web.ui.page.uiculture.aspx My testing also supports the fact that it doesn't default to auto (since I tried the related exercise without these being set and it didn't detect the browser language preference). In addition the web.config appears to default them to blank - refer to Remarks - Default Configuration per this article http://msdn.microsoft.com/en-us/library/hy4kkhe0.aspx. If you could confirm this for me and update the text if required that would be appreciated. Thanks.

Note from the Author or Editor:
This errata is correct. Please remove the sentence: "By default, Visual Studio defines the UICulture and Culture page attributes as auto."

Rob Shattock  Mar 29, 2011  Aug 19, 2011
Printed
Page 308
Point 5.

Step 5 says "From the Tools menu, select Generate Local Resource"... however what you may want to point out (either here or earlier in the chapter) is that (to my knowledge) the "Generate Local Resource" option is not available in Microsoft Visual Web Developer 2010 Express edition - an icon appears for it in the toolbar but is always greyed out (Refer to http://msdn.microsoft.com/en-us/library/ms247246.aspx and then scroll down to "Creating Resources From a Web Page" where it says "The following feature is not available with Visual Web Developer Express.").

Note from the Author or Editor:
To step 5 (after the sentence described in the previous errata), please add, "The Generate Local Resource command is not available in Visual Studio Web Developer 2010 Express edition."

Rob Shattock  Mar 29, 2011  Aug 19, 2011
Printed
Page 308
Point 5.

In addition to my initial comment about Step 5, it would be helpful to suggest that if implementing local resources manually that to be able to detect browser language preferences you will need to add either <% Page Culture="auto" UICulture="auto" %> (which "Generate Local Resource" does for you automatically) or add to your web.config <globalization uiCulture="auto" culture="auto" />. Despite what you say on page 306, Visual Studio does not appear to define the UICulture and Culture page attributes as auto by default - in fact it appears to set them to blank and hence only the default culture will be used - refer to Remarks - Default Configuration per this article http://msdn.microsoft.com/en-us/library/hy4kkhe0.aspx).

Note from the Author or Editor:
Please add the following sentence to Step 5: "It will also set the Culture and UICulture directives for the page to Auto and set the meta:ResourceKey attribute."

Rob Shattock  Mar 29, 2011  Aug 19, 2011
Printed
Page 309
NOTE

There appears to be a typo in the NOTE i.e. "This code sample uses CultureTypes.NeutralCultures cultures to get a list of cultures that provide both language and culture information (for example en-us instead of just en)." ...that should actually read: "This code sample uses CultureTypes.NeutralCultures cultures to get a list of cultures that provide just language information (for example en instead of just en-us)."

Rob Shattock  Mar 29, 2011  Aug 19, 2011
Printed, PDF
Page 309
Point 13

p309 C6L1 MCTS 70-515 "method" instead of "event" Point 13... CHANGE "Call the base InitializeCulture event" TO "Call the base InitializeCulture method"

Note from the Author or Editor:
CHANGE "Call the base InitializeCulture event" TO "Call the base InitializeCulture method"

Per Hygum Due  Feb 09, 2012  Mar 02, 2012
Printed, PDF, Safari Books Online
Page 309
NOTE

NOTE NEUTRAL VS. SPECIFIC CULTURES The first sentence and a note is incorrect. Instead it should read something like "This code sample uses CultureTypes.NeutralCultures cultures to get a list of cultures that provide only language information (for example just en instead of en-us)."

Note from the Author or Editor:
Please change the note text to read as follows (only changed the first sentence): This code sample uses CultureTypes.NeutralCultures to get a list of cultures that are associated with a language but not specific to a country or region (for example en instead of en-us). You can use CultureTypes.SpecificCultures instead if you want the user to pick both language and culture. You can use neutral cultures to define the UICulture object, but you can only use specific cultures to define the Culture object.

Anonymous  Feb 10, 2011  Mar 01, 2011
Printed, PDF, Safari Books Online
Page 312 & 897
Last paragraph

Answer to question 4 of Chapter 6, Lesson 1 should be D, not A. D is deemed incorrect with this explaination: "ASP.NET does not create strongly typed properties inside the Resources class. Instead, you must use the Resources.Resource object." This is in contradiction with the first paragraph of page 303, which states: "ASP.NET creates an object that allows you to access global resource values programmatically by using the Resources.ResourceFilename.Resource syntax. This is a strongly typed class of the Resources.Resource object for each global resource file." This is confirmed by Visual Studio intellisense.

Note from the Author or Editor:
The question is correct but somewhat unclear. Please change question 4 on page 312 to read as follows: 4. You add a global resource with the name Login to the resource file named Resource.resx. How can you access that global resource programmatically? Please then change the answer to question 4 on page 897 to read: A. Correct: ASP.NET will automatically create a strongly typed object for your global resources. This object can be referenced as Resources.ResourceFileName.Resource (or Resources.Resource.Login in this case).

Moreno Gentili  Jan 05, 2011  Mar 01, 2011
Printed
Page 315
3rd paragraph

"This causes the cell to render a header attribute..." should read "This causes the cell to render a headers attribute..."

Note from the Author or Editor:
3rd bullet, sentence 4 should read, "This causes the cell to render a headers attribute..."

Anonymous  Jun 01, 2011  Aug 19, 2011
Printed, PDF, Safari Books Online
Page 323, 324
Code segment at bottom of 323, top of 324

Button3 should be Button1

Note from the Author or Editor:
on page 323 and 324, step 9, the code lines that references Button3.UniqueId should read Button2.UniqueId (both VB and C#)

Anonymous  Jun 01, 2011  Aug 19, 2011
Printed
Page 324
Point 11.

You might want to make it clear that accessibility testing(as described on pages 318-321) is not available within Microsoft Visual Web Developer 2010 Express (this link is for 2008 but nothing appears to have changed http://msdn.microsoft.com/en-us/library/ex3w0c3d(v=VS.90).aspx).

Note from the Author or Editor:
To the end of item 11, please add the sentence: "Accessibility testing is not available in Visual Studio Web Developer 2010 Express."

Rob Shattock  Mar 30, 2011  Aug 19, 2011
Printed, PDF, Safari Books Online
Page 333
1st paragraph

In the chapter "Defining User Control Events" you wrote: "after the page Init event is called, the control's Init event is called". I think that's not true. I tested it and also compared it with this page: http://msdn.microsoft.com/en-us/library/ms178472.aspx where you can read the following text: "The Init event of individual controls occurs _before_ the Init event of the page".

Note from the Author or Editor:
You are right about the Init event. The text is correct for the Load event. p. 333, the section, Defining User Control Events, first paragraph should now read as follows: User controls can have their own encapsulated events. These include life cycle events such as Init and Load. These events are called in sync with the events on the page. For example, before the page’s Init event is called, the Init event for each control on the page is called. Processing then returns to the page for the Load event. First, the page’s OnLoad event is called. Next, the OnLoad event is called for each control on the page. Finally, the page’s Load event is called; then, each control on the page gets its Load event fired. This model allows you to develop user controls in a manner similar to developing a webpage.

Anonymous  Feb 13, 2011  Aug 19, 2011
Printed
Page 343
Sample c# Code

"public Address Address {get; set;}" does not create a new Instance of Address; not equivalent with VB code (first lines of page 343) => C# example won't work (null object reference)

Note from the Author or Editor:
change code at the button of p. 343 that reads, "public Address Address { get; set; } to: private Address _address = new Address(); public Address Address { get { return _address } set { _address = value; } }

Jeroen  May 04, 2011  Aug 19, 2011
Printed
Page 350
sample of C# Code

public string PostalCode { get { return TextBoxPostal.Text; } set { TextBoxPostal.Text = value; } } TextBoxPostal should be TextBoxPostalCode (= ID of the control)

Note from the Author or Editor:
On page 350, in the C# sample code at the top, the last property should read: public string PostalCode { get { return TextBoxPostalCode.Text; } set { TextBoxPostalCode.Text = value; } }

Tim Oldenkamp  Apr 07, 2011  Aug 19, 2011
Printed
Page 357
5th paragraph

"...display of your user control..." should be "...display of your custom control..." or "...display of your server control..."

Note from the Author or Editor:
Final paragraph on the page, first sentence, change to read: The final step is to render the display of your custom web server control.

Anonymous  Jun 01, 2011  Aug 19, 2011
Printed
Page 358
top sample of C# code

output.Write style section needs a colon (:) following display rather than a semi-colon (;) display:inline-block

Note from the Author or Editor:
p 358, C# sample at the top, the output.Write style section needs a colon (:) following "display" rather than a semi-colon (;) should read: ... display:inline-block; ...

Anonymous  Feb 14, 2011  Aug 19, 2011
Printed, PDF, Safari Books Online
Page 361
1st row in table

"RenderContent" should be "RenderContents"

Note from the Author or Editor:
Table 7-1, row 1, Description, sentence 2 should say "RenderContents" and not "RenderContent".

Anonymous  Jun 01, 2011  Aug 19, 2011
Printed, PDF, Safari Books Online
Page 365
1st paragraph

Incorrect figure reference. The paragraph should read: "As shown earlier in Figure 7-7..." instead of: "As shown earlier in Figure 7-6..."

Note from the Author or Editor:
Page 365, first paragraph should read: As shown earlier in Figure 7-7, ...

Rob Shattock  Jul 24, 2011  Aug 19, 2011
PDF
Page 370
3rd Paragraph

Sentence "For example, suppose you want to customize the design-time view of the LabelTextBox control" "LabelTextBox" should probably read "LabeledTextBox", in line with the rest of the text/examples

Note from the Author or Editor:
Sentence "For example, suppose you want to customize the design-time view of the LabelTextBox control" "LabelTextBox" should read "LabeledTextBox"

Anonymous  Sep 19, 2011  Mar 02, 2012
Printed, PDF, Safari Books Online
Page 373
First line

Are you sure a CompositeControl needs to implement INamingContainer ? There's none in the C# example and it works perfectly well. Isn't it just the Templated Control that needs to provide a naming container? Specifically for the purpose that it has no UI, unlike the CompositeControl?

Note from the Author or Editor:
The last sentence on p 372 (carries to 373) should read: You start by defining a class the inherits from CompositeControl. The following code shows the implementation of this control. The code in the Sample of Visual Basic Code on p 373, top, should have the line "Implements INamingContainer" removed (line 4).

crótach  Feb 14, 2011  Aug 19, 2011
Printed, PDF
Page 391
2nd paragraph

Sample web.config section is missing a / in the closing <system.web> tag: <configuration> <system.web> <compilation debug="true" targetFramework="4.0"/> <system.web> </configuration> Should be: <configuration> <system.web> <compilation debug="true" targetFramework="4.0"/> </system.web> </configuration>

Note from the Author or Editor:
Valid, please make change as described.

Richard Brown  Dec 28, 2011  Mar 02, 2012
Printed
Page 400
1st paragraph

It should read "4. View Default2.aspx in a browser again...." not Default.aspx.

Note from the Author or Editor:
Valid, please change as described.

Rob Shattock  Sep 18, 2011  Mar 02, 2012
Printed
Page 405
2nd paragraph

"raceMode" should be "traceMode"

Note from the Author or Editor:
Valid errata, please change "raceMode" to "traceMode"

Anonymous  Jun 01, 2011  Aug 19, 2011
Printed, Other Digital Version
Page 418
Lesson Review - Question 4

The printed version shows correct wording answer for Question 4 - is (D) WebAuthenticationFailureAuditEvent. But the Lesson Review Answer on Page 903 shows incorrect explanation for (D) selection. Also the Lesson Review Test on the CD shows the wrong answer - WebAuthenticationSuccessAuditEvent You want to configure ASP.NET health monitoring to log information every time a user fails to log on to the server. Which web event class should you use? WebAuthenticationSuccessAuditEvent WebApplicationLifetimeEvent WebRequestEvent WebAuditEvent The explanation given for the Lesson Review Test is incorrect: This class sends an event when a user successfully authenticates with the website. The question is checking when user fails to log on. Correct Explanation: The WebAuthenticationFailureAuditEvent is used to provide information when a failed attempt at user authentication occurs on the site.

Note from the Author or Editor:
Valid. On page 418, please change answer 4D to WebAuthenticationFailureAuditEvent. On page 903, please change explanation 4D to "This class sends an event when a user attempts to authenticate to the website but provides invalid credentials." The PTQ on the CD will also need to be corrected similarly.

Anonymous  Dec 24, 2011  Mar 02, 2012
PDF
Page 418
Lession 2 Review Question 4

The correct answer is not in the list of multiple choice options. The book asserts the correct answer is "D" - WebAuthenticationSuccessAuditEvent. But this is not true. The answer is WebAuthenticationFailureAuditEvent.

Note from the Author or Editor:
Valid--we need to make this change.

Brian Swanson  Dec 30, 2010  Feb 01, 2011
PDF
Page 420
5th paragraph - code sample

To add a setting to the web.config the following configuration is given as the sample: <configuration> <connectionStrings> <add name="MyDatabase" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\mydb.mdf;User Instance=true" providerName="System.Data.SqlClient" /> </connectionStrings> </configuration> This will not work since it does not include: xdt:Transform="Insert" on the <add> element. If the transformation engine does not find an xdt:Transform attribute then that node is ignored, hence the sample given will NOT add a connection string to the web.config that is generated.

Note from the Author or Editor:
This is valid. Please add: xdt:Transform="Insert" After (on the same line as): <add name="MyDatabase"

Chris White  Mar 24, 2011  Aug 19, 2011
PDF
Page 420, 445, 450
Middle of the page

[Not a big issue] Links going to new line are broken in the PDF version of the book. A couple examples: Page 420: the link pointing to msdn.microsoft.com Page 445: blog.iis.net Page 450: william.jerla.me

Note from the Author or Editor:
Valid formatting problem, please correct if possible.

Moreno Gentili  Jan 22, 2011  Mar 01, 2011
Printed
Page 432
.

On page 432, it mentions IISVERSION >= "#7" (check for IIS 4.0 or later) The comment should be IIS 7.0 or later

Note from the Author or Editor:
Correct, please change "4.0" to "7.0" on page 432.

Anonymous  Aug 05, 2011  Mar 02, 2012
PDF
Page 441
Middle of page

The note saying that "Projects created with the ASP.NET Web Application template are always precompiled" is misleading. While it is true that the code files are precompiled, this is NOT the case for .aspx files. Therefore, the section involving indicating whether or not a site should be updatable is equally applicable to ASP.NET Web Application template projects as well.

Note from the Author or Editor:
Valid point. Please change the last sentence of the note to, "Visual Studio always precompiles code files contained within projects created with the ASP.NET Web Application template."

Brian Swanson  Dec 30, 2010  Feb 01, 2011
PDF
Page 443
Quick Check

"Quick check" section: Question: What launch condition does a Web Setup Project include by default? Answer: By default, a Web Setup Project checks for an IIS version later than 4.0. When i create web setup project, it contains lunch condition "IIS condition" ((IISMAJORVERSION >= "#5" AND IISMINORVERSION >= "#1") OR IISMAJORVERSION >= "#6") by default. I think, correct is iis version 5.1 and above

Note from the Author or Editor:
Please change quick check answer #1 on page 443 to "1. By default, a Web Setup Project verifies the IIS version."

Radovan Jupa  Dec 09, 2011  Mar 02, 2012
Printed, PDF
Page 458
3rd Paragraph

First sentence of third paragraph: "By default, the ScriptManager control’s EnablePartialRending property is set to true". The property should be "EnablePartialRendering"

Note from the Author or Editor:
Change EnablePartialRending to EnablePartialRendering

Damien  Oct 05, 2011  Mar 02, 2012
PDF
Page 475
End of first paragraph

Regarding the OnClick / OnClientClick events, text reads "Note that returning false from onClick negates the postback". I believe this should be "Note that returning false from onClientClick negates the postback"

Note from the Author or Editor:
p. 475, end of the paragraph at the top of the page, change the text in the parenthetical that says "onClick" to "onClientClick".

Anonymous  May 12, 2011  Aug 19, 2011
Printed, PDF, Safari Books Online
Page 475
First half of the page, just before the headline

Quoting from page 475: "The ASP.NET controls also have the ClientId property for changing the client ID from that of the server". Are you sure? The ClientID property has no setter, it is read-only in fact. Its primary purpose is to use it in javascript code, such as: document.getElementById("<%=Panel1.ClientID %>").style.display="none"; You should mention the ClientIDMode property instead, since it's a novelty of Asp.NET 4.0 and it's never mentioned elsewhere in the book. Page 475 seems like a good spot to talk about it. Setting ClientIDMode="Static" will be helpful to those who want to know for sure what the client id will be.

Note from the Author or Editor:
Near the top of page 475, replace the entire paragraph that starts with "It is also important to note that you can" with the following: It is also important to note that you can reference ASP.NET controls inside your client-side script. You reference them based on their rendering as HTML. The ASP.NET controls have the ClientId property for referencing the control inside client script or CSS rules. This property's value is generated based on how you set the ClientIDMode attribute. For example, to guarantee the ClientID value is always set to the value of the ID property, you can set ClientIDMode to Static. By default, the ClientIDMode is set to Predictable which means the ClientID value is generated by concatenating the ClientID of the parent container with the ID value of the control.

Moreno Gentili  Feb 05, 2011  Mar 01, 2011
Printed, PDF, Safari Books Online
Page 482
C# code Example

On page 482 in the C# code example on line 10 where the code is as follows: string callbackScript = String.Format("function MyServerCall(args) {{0};}, ", callbackRef); I received a FormatException when running this code (errorMessage: "Input string was not in a correct format") on .Net 4.0 VS2010. The curly brackets were not escaped properly and causing String.Format method to throw an exception. I replaced the code with the following to allow for a successful build: string callbackScript = String.Format("function MyServerCall(args) {{{0};}}", callbackRef);

Note from the Author or Editor:
There are 2 changes required for this fix (one for c# and one for vb). In both cases, on page 482, after the comment "define a function used by the client to call the server" change the line (2 lines) to the following: Dim callbackScript As String = String.Format( _ "function MyServerCall (args) {{{0};}}", callbackRef) CHANGE the same line in the C# code example to the following: string callbackScript = String.Format( "function MyServerCall(args) {{{0};}}", callbackRef);

Charles Lafferty  Feb 07, 2011  Mar 01, 2011
Printed, PDF
Page 487
End of page

The last code example of the page contains a small typo. this.RequireNumber = requireNumber) Change the parenthesis to a semicolon.

Note from the Author or Editor:
p. 487, buttom of the page, the text that reads: this.RequireNumber = requireNumber) should be changed to: this.RequireNumber = requireNumber;

Moreno Gentili  Feb 13, 2011  Aug 19, 2011
Printed, PDF, Safari Books Online
Page 492, 498, 505, 510
1st paragraph (IMPORTANT BOX)

The book states: Important Loaded script When you write JavaScript that is intended to be used by the Microsoft AJAX Library, you need to tell the library when you have finished loading your script. You can do so by calling the notifyScriptLoaded method of the Sys.Application object. The following shows an example. //indicate that this is the end of the class / script if (typeof(Sys) !== 'undefined') Sys.Application.notifyScriptLoaded(); While http://msdn.microsoft.com/en-us/library/bb310952.aspx notes: This API is obsolete. You no longer need to call this method in order to notify the Microsoft Ajax Library that the JavaScript file has been loaded.

Note from the Author or Editor:
This API is now obsolete with 4.0. This book is still referring to it. I have listed modifications by page number. p. 492, top: please replace the entire Important box to read as follows IMPORTANT LOADED SCRIPT NOTIFICATION OBSOLETE In prior versions of the .NET Framework, it was important to tell the Microsoft AJAX Library when you had finished loading your script. You did so by calling the notifyScriptLoaded method of the Sys.Application object as in the following example: //indicate that this is the end of the class / script if (typeof(Sys) !== 'undefined') Sys.Application.notifyScriptLoaded(); In the .NET Framework 4.0, this is no longer required. You may still have code that calls this, but it is not required. For more information, see: http://msdn.microsoft.com/en-us/library/bb310952.aspx p. 498, top in the code, remove the code lines: //notify loaded if (typeof(Sys) !== 'undefined') Sys.Application.notifyScriptLoaded(); p. 505, step 6 of exercise 1, The last sentence of the step text should now read, "The following code shows an example." Remove the 2 code lines that read: //notify script loaded if (typeof(Sys) !== 'undefined') Sys.Application.notifyScriptLoaded(); p. 510, step 6 of exercise 2, The last sentence of the step text should now read, "The following code shows an example." Remove the 2 code lines that read: //notify loaded if (typeof(Sys) !== 'undefined') Sys.Application.notifyScriptLoaded();

Oliver Schnarchendorf  Jul 19, 2011  Aug 19, 2011
Printed, PDF
Page 495
Last row, in "Note" box

"path" should be replaced with "name" for VS to give intellisense for for MS AJAX Library.

Note from the Author or Editor:
bottom of page 495, the single line of markup should read, /// <reference name="MicrosoftAjax.js"/>

Dan Pettersson  Aug 23, 2011  Mar 02, 2012
Printed
Page 496
Last row of code, call to $addHandlers

"this.onKeyupHandler" should be passed to $addHandlers call instead of "this.onKeyup", like this: $addHandlers(this.get_element(), { 'keyup': this._onKeyupHandler }, this);

Note from the Author or Editor:
change the $addHandlers line near the bottom of the page to read: $addHandlers(this.get_element(), { 'keyup': this._onKeyupHandler }, this);

Dan Pettersson  Aug 23, 2011  Mar 02, 2012
Printed, PDF, Safari Books Online
Page 510
Code segment at top

"Sys.Control" should be "Sys.UI.Control"

Note from the Author or Editor:
This just is an update to the code comment. At the top of the code segment for step 6, change the comment to read: //register class as a Sys.UI.Control

Anonymous  Jun 01, 2011  Aug 19, 2011
Other Digital Version
515P_5.5_06
Second anwser

In question 515P_5.5_06 one of the answers is: Remove the default DynamicDataRoute from the Global.aspx file. This should be: Remove the default DynamicDataRoute from the Global.asax file. Because a dynamic data project contains a global.asax by default and doesn't contain a global.aspx.

Dennis Spijkerboer  Apr 28, 2011 
Printed
Page 515P_5.2_06
Practice test

The second option that says: "Define an XSL file to transform the XML, and set the Transform attribute to the name of the XSL file" should read: "Define an XSL file to transform the XML, and set the TransformFile attribute to the name of the XSL file"

Note from the Author or Editor:
Valid, please change as described.

Andrew Knox  Aug 16, 2011 
Printed
Page 522
Figure legend

"jquery-1.4.min.js" should be "jquery-1.4.1.min.js"

Note from the Author or Editor:
The caption for Figure 9-8 is missing the ".1"; it should end with, "jquery-1.4.1.min.js"

Anonymous  Jun 01, 2011  Aug 19, 2011
PDF
Page 525
Table 9-1

("a[href^=Folder/]") --> $ missing, should be: $("a[href^=Folder/]") $(a[href$=.com]") --> " missing, should be: $("a[href$=.com]") $(a[href!=http://www.MyDomian.com]") --> " missing, should be: $("a[href!=http://www.MyDomian.com]")

Note from the Author or Editor:
Table 9-1, row 2, the example is missing the dollar sign ($). It should read as follows: $("a[href^=Folder/]") Row 3 is missing a quote ("). It should read: $("a[href$=.com]") Row 4 is missing a quote and Domain is spelled wrong (fixed as part of another issue). It should read: $("a[href!=http://www.MyDomain.com]")

Hans Sijben  Mar 17, 2011  Aug 19, 2011
Printed
Page 525
2nd table, 2nd row

Remove "the" from "Used to select the all..."

Note from the Author or Editor:
In table 9-2, the Description for the second row should read, "Used to select all first child ..."

Anonymous  Jun 01, 2011  Aug 19, 2011
PDF
Page 534
3rd paragraph in table 9-6

jQuery.fx.off ; The method described will not turn off the jQuery effects please change is into jQuery.fx.off = true; This will turn off the jQuery effects.

Note from the Author or Editor:
The table simply mentions methods. It does not show examples of how to use them. To clarify, the description for row three should now read as follows: Set to true to turn off all jQuery effects for the page.

Hans Sijben  Mar 17, 2011  Aug 19, 2011
Printed
Page 537
Near bottom

Replace "$.jquery()" with "$.ajax()"

Note from the Author or Editor:
Near the bottom, second to last paragraph reads, "The $.jquery() call ... ". Replace with, "The $.ajax() call ...".

Anonymous  Jun 01, 2011  Aug 19, 2011
Printed, PDF
Page 543
Ex2 #3 missing })

so much of my valuable time is lost because of these countless errors ;-(

Note from the Author or Editor:
The code for item 3 should have an additional curly brace. The last 3 lines should read: } }); </script>

Anonymous  Sep 22, 2011  Mar 02, 2012
Printed, PDF, Safari Books Online
Page 546 & 907
Lesson Review, Question #1

.fadeIn() did and does accept a numeric value that specifies the duration of the effect in milliseconds. The convenience values for "slow" and "fast" are 600ms and 200ms respectively. "D" should be an acceptable answer as well, or the option should be rewritten. The explanation on p907 is wrong: "Incorrect: The .fadeIn() method does not take numeric values."

Note from the Author or Editor:
First, please change the question to read as follows: 1. You need to write jQuery code to select the first heading (h2) tag on the page and then slowly fade the item into view. Which line(s) of code would accomplish this task? (Choose all that apply.) Next, please indicate that both answers B and D are acceptable. Next, change answer C to only read: Incorrect: This dot notation is used for selecting elements based on cascading style sheet class names. Finally, change answer D to read: Correct: The .fadeIn() method can also take numeric values indicating the duration (in milliseconds) of the fade.

Andras Vass  Jan 09, 2011  Mar 01, 2011
Printed
Page 569@gmail.com
4th and 5th block of code

In the Application_BeginRequest block of code there is a typo: Original: eLog.Source = "Applicaiton"; i think this needs to be "Application" The difference is in the 'aiton' what needs to be 'ation'. this same mistake is made at the block of code of Application_EndRequest.

Note from the Author or Editor:
p. 568 and 569 there are 4 instances of "Applicaiton" in the code blocks. Each should read, "Application"

Lukas Huzen  Feb 11, 2011  Aug 19, 2011
Printed, PDF, Safari Books Online
Page 574, 909
Question 3, answers C and D

Answers C and D to question 3 read: "Override the Init method..." "Override the ProcessRequest method" Forgive me if I'm wrong but when implementing an interface, I think you don't "override" methods. Instead, you "implement" them, or "declare" them.

Note from the Author or Editor:
p. 574 the text for question 3 should read as follows: B. Implement the Init ... C. Implement the ProcessRequest ... p. 909, the text for question 3 (bottom) should read as follows: B. Correct: You implement the ...

Moreno Gentili  Feb 13, 2011  Aug 19, 2011
PDF
Page 576
Bottom of page

Sample of Visual Basic Code <%@ WebService Language="VB" CodeBehind="~/App_Code/Authors.cs" Class="Authors" %> should read Sample of Visual Basic Code <%@ WebService Language="VB" CodeBehind="~/App_Code/Authors.vb" Class="Authors" %>

Note from the Author or Editor:
In the Sample of Visual Basic Code line, the "Authors.cs" reference should be to "Authors.vb" for the CodeBehind attribute.

Joel Gallagher  May 23, 2011  Aug 19, 2011
Printed, PDF, Safari Books Online
Page 580
Sample of C# code

There is a "[" character missing before "WebMethod"

Note from the Author or Editor:
Near the top of the page, in the "Sample of C# Code" there is a missing open bracket. The link should read: [WebMethod(CacheDuration=300)]

Anonymous  Jun 01, 2011  Aug 19, 2011
PDF
Page 588
Step # 8

Add using (Imports in Visual Basic) statements to the class file for System.Data, System.Data.SqlClient, and System.Configuration. Should also add System.Text as the following code uses a StringBuilder class

Note from the Author or Editor:
Change the end of step 8 to read, "...System.Data.SqlClient, System.Configuration, and System.Text".

Joel Gallagher  May 24, 2011  Aug 19, 2011
Printed
Page 603
paragraph before NOTE

The paragraph is misleading. It seems to imply that REST services only use the HTTP GET method. In fact they can use POST, PUT, and DELETE as well. Also the example on p. 605 uses POST because of the [WebInvoke] attribute. I would suggest rewording the paragraph on p. 603 so that it doesn't imply REST is for GET requests only.

Note from the Author or Editor:
The paragraph before the NOTE should read as follows: A REST service is a web service you create that responds to basic HTTP requests such as GET, POST, PUT, and DELETE. Clients can therefore call a REST service the same way they would call a web page. This includes a simple GET using a URL and a query string and a POST request. The server then responds with text, as it would for any HTTP request. This way, a REST service does not require knowledge of the XML schema used to call the service. Instead, it simply sends the request and processes the text-based response (usually JSON formatted data).

Anonymous  May 12, 2011  Aug 19, 2011
Printed
Page 605
Last textual paragraph

Replace "enableWeb-Script" with "enableWebScript"

Note from the Author or Editor:
Change the text in the last paragraph that reads "<enableWeb-Script>" to "<enableWebScript>".

Anonymous  Jun 01, 2011  Aug 19, 2011
Printed, PDF
Page 608
4th paragraph

The class inherited from is written as 'System.Data.Serivces.DataService', which is a typo for 'System.Data.Services.DataService'.

Bradley Hopkinson  May 19, 2011  Aug 19, 2011
Printed, PDF, Safari Books Online
Page 611
Quick Check Answers, Answer #3

The WebGetAttribute is missing from the answer. (http://msdn.microsoft.com/en-us/library/bb412204.aspx) Rest services by convention use GET to list or retrieve resources. (http://en.wikipedia.org/wiki/Representational_State_Transfer#RESTful_web_services)

Note from the Author or Editor:
On p. 611 Quick Check Answer #3 should read: 3. You mark the service with either the WebInvokeAttribute or WebGetAttribute class.

Andras Vass  Jan 09, 2011  Mar 01, 2011
Printed, PDF
Page 629
Sample of Visual Basic Code

I assume the ID of the fourth employee should be 114

Note from the Author or Editor:
In the Visual Basic code (top half of the page) there are duplicate lines that read .ID = 113, Change the second line to read, .ID = 114,

Edwin Smit  Nov 29, 2011  Mar 02, 2012
Printed, PDF
Page 639
last paragraph

I assume the phrase '... employee list data and coverts it into ...' should be: employee list data and converts it into ...'

Note from the Author or Editor:
change "coverts" to "converts" at the bottom of the page.

Edwin Smit  Nov 29, 2011  Mar 02, 2012
PDF
Page 640
Sample of C# Code

In the book Intellisense dit not recognise the properties (ID, FirstName, Department) I had to change the code from XElement("Employee", new XElement("ID", emp.ID), new XElement("FirstName", emp.FirstName), new XElement("Department", emp.Department) into XElement("Employee", new XElement("ID", emp.Element("ID")), new XElement("FirstName", emp.Element("FirstName")), new XElement("Department", emp.Element("Department"))

Note from the Author or Editor:
The example assumes there is a list called employees. This will make sure the code sample works. The following is an example: List<Employee> employees = new List<Employee>() { new Employee {First="Michael", ID=111, Department="IT Department", City="Pittsburgh"}, new Employee {First="Hank", ID=112, Department="IT Department", City="Redmond"}, new Employee {First="Benjamin", ID=113, Department="Human Resources", City="Chicago"}, new Employee {First="Gail", ID=114, Department="Marketing", City="Ann Arbor"}, };

Hans Sijben  Mar 14, 2011 
PDF
Page 641
example of JSON format, just below the middle of the page

Typo curly bracket missing "Null":null,{"City":"Redmond","Department":"IT Department","First": "Hank","ID":112,"Last": null}] should be: "Null":null},{"City":"Redmond","Department":"IT Department","First": "Hank","ID":112,"Last": null}]

Note from the Author or Editor:
p. 641 the code above the "Practice" heading is missing a curly brace (}) on the second line between "Last":null,{"City": it should read, "Last":null},{"City":

Hans Sijben  Mar 14, 2011  Aug 19, 2011
Printed, PDF
Page 644
Number 8 line 3

Employees in a department will be returned. The line should read It will then query the employee.xml file and return within the specified department.

Note from the Author or Editor:
Change the line that reads, It will then query the employee.xml file and return departments with a matching name. to It will then query the employee.xml file and return those employees within the given department.

William Rachel  Nov 22, 2011  Mar 02, 2012
Printed, PDF, Safari Books Online
Page 653
2nd paragraph

Remove ")" character at the end

Note from the Author or Editor:
Under, "Using the DataAdapter", second paragraph, last sentence, remove the paren ")" at the end of the sentence.

Anonymous  Jun 01, 2011  Aug 19, 2011
Printed, PDF, Safari Books Online
Page 675
2nd paragraph, last sentence

Add "when" between "disposed" and "the"

Note from the Author or Editor:
The last sentence of the second paragraph on the page, should include the word "when" and thus read, "This is not required but is good practice, to make sure that the context is properly disposed when the data retrieval is finished."

Anonymous  Jun 01, 2011  Aug 19, 2011
Printed, PDF, Safari Books Online
Page 721
1st paragraph after "Introducing Data-Bound Controls"

Replace "FormsViews" with "FormView"

Note from the Author or Editor:
Section "Introducing Data-Bound Controls, first paragraph, second sentence: change FormsView to FormView.

Anonymous  Jun 01, 2011  Aug 19, 2011
Safari Books Online
739
Chart example

I've encountered a couple of issues when trying to run a charting example for the first time, so it might be an idea to clarify this in the book. Firstly, when you drop a Chart control on a page the web.config gets changed without any notification and the application stops working. I had to remove the <httpHandlers> section from <system.web>, since this causes errors on IIS 7.5. Then there's the problem of directories and permissions. By default the control creates images in c:\TempImageFiles\ directory, which doesn't exist. If you create the directory, you will need to give IIS process permissions to it. Since my C:\ drive is an SSD, I've opted to use D:\Temp as chart image temporary storage and ended up with this <appSettings> <add key="ChartImageHandler" value="storage=file;timeout=20;dir=D:\Temp\;" /> </appSettings> Since it's not required for the lesson review, maybe you've opted to leave this out, I just thought I'd save others some time in figuring this out, and would have liked to have this mentioned in the book.

Note from the Author or Editor:
This is a very specific issue with IIS 7.5 that is not covered in the book.

crótach  Apr 01, 2011 
Printed, PDF, Safari Books Online
Page 739
In code segment, middle

Remove the extra quotation mark and space character after "ChartType="

Note from the Author or Editor:
In the middle of the page, in the markup, the line that reads, ChartType=" "Bar" should read, ChartType="Bar"

Anonymous  Jun 01, 2011  Aug 19, 2011
Printed, PDF, Safari Books Online
Page 746
Menu control example

There is no XmlDataSource in the example, and there is no XPath expression either, even though both are mentioned in the text. I'm guessing the XML file with menu items has been changed to simplify the example, but the text has stayed the same.

Note from the Author or Editor:
Last paragraph on page 746 the first sentence should be deleted. The paragraph should start with, "The following code ... ".

crótach  Apr 01, 2011  Aug 19, 2011
Printed, PDF, Safari Books Online
Page 751
Line "17"

Replace "DetailView" with "DetailsView"

Note from the Author or Editor:
On page 751, in Step 17 change "DetailView" to read "DetailsView"

Anonymous  Jun 01, 2011  Aug 19, 2011
Printed, PDF, Safari Books Online
Page 772
2nd paragraph after "Customizing an existing field template"

Replace "code edit pages" with "code edit controls"

Note from the Author or Editor:
In the section title, "Customizing an existing field template", the first sentence includes the text "core edit pages". This should read "core edit controls".

Anonymous  Jun 01, 2011  Aug 19, 2011
Printed, PDF, Safari Books Online
Page 772
2nd paragraph after "Customizing an existing field template"

Replace "DataTime" with "DateTime"

Note from the Author or Editor:
On page 772, the section titled "Customizing an existing field template". The first sentence in the second paragraph has the referece to "DataTime_Edit.ascx". This should be "DateTime_Edit.ascx".

Anonymous  Jun 01, 2011  Aug 19, 2011
Printed, PDF
Page 772
2nd paragraph after "Customizing an Existing Field Template"

The text says, "For example, you could modify the code-behind file... to change the background color of the control if a different background color is required." Should read something like, "For example, you could modify the code-behind file... to change the background color of the control if the control represents a required field."

Note from the Author or Editor:
Change the text that says, "For example, you could modify the code-behind file ... to change the background color of the control if a different background color is required." To read, "For example, you could modify the code-behind file ... to change the background color of the control if the control represents a required field."

Anonymous  Nov 29, 2011  Mar 02, 2012
Printed
Page 778
Sample code, bottom of page

The sample C# code for the Page_Init method is missing it's parameters. Should read: protected void Page_Init(object sender, EventArgs e) { ... } VB sample code is fine.

Note from the Author or Editor:
change the first link of the C# sample code at the bottom of the page to read, protected void Page_Init(object sender, EventArgs e)

Andrew Knox  Aug 15, 2011  Mar 02, 2012
Printed, PDF
Page 816
End of page, quick check answer #2

"2. The LoginName, ChangePassword, and LoginView controls are useful only to authenticated users." I agree on the first two, but the LoginView is also useful to Anonymous users. In fact, it has an AnonymousTemplate whose contents are only visibile to unathenticated users. I would use that template to show them an asp:Login control.

Note from the Author or Editor:
Valid point. Please change the answer for #2 to: "2. The LoginName and ChangePassword controls are useful only to authenticated users. LoginView is also useful to unauthenticated users when you set the LoginView.AnonymousTemplate property."

Moreno Gentili  Mar 20, 2011  Aug 19, 2011
Safari Books Online
846
Question #3, Option B

It might be "<%: ViewData[...] %>" that was meant.

Note from the Author or Editor:
Please italicize "object" to indicate that it is a placeholder.

Andras Vass  Jan 09, 2011  Feb 01, 2011
Printed, PDF
Page 851
1st text paragraph

Model.IsValid should be ModelState.IsValid

Note from the Author or Editor:
Page 851, first paragraph that begins with "The rules you define ...". The reference to Model.IsValid should read, ModelState.IsValid.

Moreno Gentili  Apr 03, 2011  Aug 19, 2011
Printed, PDF, Safari Books Online
Page 853
Last sentence

Replace "NoAction" with "NonAction"

Note from the Author or Editor:
The last sentence on page 853 should read, "To do so, you mark it with the NonAction attribute to indicate that it is not an action method."

Anonymous  Jun 01, 2011  Aug 19, 2011
PDF
Page 871

public partial class EmployeeMetadata should be public class EmployeeMetadata It's a class, no partial class.

Note from the Author or Editor:
This change does not really impact anything but should be made. Change the line in the C# sample that reads "public partial class EmployeeMetadata" to read, "public class EmployeeMetadata"

Hans Sijben  May 26, 2011  Aug 19, 2011
PDF
Page 872
Sample of C# Code

In the HttpPost part of de controllers code [HttpPost] public ActionResult Edit(Employee emp) { try { NorthwindEntities2 nw = new NorthwindEntities2(); Employee origEmp = GetEmployee(emp.EmployeeID); nw.Employees.Attach(emp); nw.ApplyOriginalValues("Employees", origEmp); nw.SaveChanges(); return RedirectToAction("Index"); } catch { return View(); } should look like the code below, there is no validation controle in the employeecontroller now, this state control is also missing for ActionResult Create,and in the VB code on page872 [HttpPost] public ActionResult Edit(Employee emp) { if (ModelState.IsValid == true) { try { NorthwindEntities2 nw = new NorthwindEntities2(); Employee origEmp = GetEmployee(emp.EmployeeID); nw.Employees.Attach(emp); nw.ApplyOriginalValues("Employees", origEmp); nw.SaveChanges(); return RedirectToAction("Index"); } catch { return View("Edit",emp); } } else { return View("Edit", emp); }

Note from the Author or Editor:
p 872, VB sample code for the HttpPost version of the Create function should read as: <HttpPost()> _ Function Create(ByVal emp As Employee) As ActionResult If ModelState.IsValid Then Try Dim nw As New northwndEntities() nw.AddToEmployees(emp) nw.SaveChanges() Return RedirectToAction("Index") Catch Return View() End Try Else Return View("Create") End If End Function p. 872, the HttpPost version of the Edit function should read: <HttpPost()> _ Function Edit(ByVal emp As Employee) As ActionResult If ModelState.IsValid Then Try Dim nw As New northwndEntities() Dim origEmp As Employee = GetEmployee(emp.EmployeeID) nw.Employees.Attach(emp) nw.ApplyOriginalValues("Employees", origEmp) nw.SaveChanges() Return RedirectToAction("Index") Catch Return View() End Try Else Return View("Edit", emp.EmployeeID) End If End Function

Hans Sijben  May 26, 2011  Aug 19, 2011
PDF
Page 873, 874
Sample of C# Code

in the HttpPost part of de controllers code [HttpPost] public ActionResult Edit(Employee emp) { try { NorthwindEntities2 nw = new NorthwindEntities2(); Employee origEmp = GetEmployee(emp.EmployeeID); nw.Employees.Attach(emp); nw.ApplyOriginalValues("Employees", origEmp); nw.SaveChanges(); return RedirectToAction("Index"); } catch { return View(); } should look like the code below, there is no validation control in the employee controller now, this state control is also missing for ActionResult Create,and in the VB code on page872 [HttpPost] public ActionResult Edit(Employee emp) { if (ModelState.IsValid == true) { try { NorthwindEntities2 nw = new NorthwindEntities2(); Employee origEmp = GetEmployee(emp.EmployeeID); nw.Employees.Attach(emp); nw.ApplyOriginalValues("Employees", origEmp); nw.SaveChanges(); return RedirectToAction("Index"); } catch { return View("Edit",emp); } } else { return View("Edit", emp); }

Note from the Author or Editor:
p. 873, the HttpPost version of the Create function should read [HttpPost] public ActionResult Create(Employee emp) { if (ModelState.IsValid) { try { northwndEntities nw = new northwndEntities(); nw.AddToEmployees(emp); nw.SaveChanges(); return RedirectToAction("Index"); } catch { return View(); } } else { return View("Create"); } } p. 874, the HttpPost version of the Edit function should read: [HttpPost] public ActionResult Edit(Employee emp) { if (ModelState.IsValid) { try { northwndEntities nw = new northwndEntities(); Employee origEmp = GetEmployee(emp.EmployeeID); nw.Employees.Attach(emp); nw.ApplyOriginalValues("Employees", origEmp); nw.SaveChanges(); return RedirectToAction("Index"); } catch { return View(); } } else { return View("Edit", emp.EmployeeID); } }

Anonymous  Jul 29, 2011  Aug 19, 2011
Printed, PDF
Page 876, 922
Question 1 and 2

Question 1, Answer B (the correct one) states that you should return Redirect("Shipment/Status"). This works, but it requires the controller to have knowledge about how the route segments are arranged, and it would stop working if I configured the route differently, for instance: {action}/{controller}. It would be advisable to call the specific redirection method: RedirectToAction("Status", "Shipment") Question 2, I believe this is a typo: "This default route should point to Default.aspx inside the view folder named Main. You create a controller named DefaultController." According to the naming convention, a view for a controller named DefaultController should be placed inside in a subfolder named "Default", not "Main".

Note from the Author or Editor:
This is correct. However, the nature of the question is testing if the reader understands the default routing conventions. That said, we will make the following changes to the question: Page 876, Question 1. The question should end with the text, (Choose all that apply.) Page 922, Answer B should read: B. Correct: This naming convention would be the most logical for the controller and action method. A better choice (not shown as an answer) would be to use the RedirectToAction method which does not rely on routing conventions that can change. For example, RedirectToAction("Status", "Shipment"). Page 922, Answer C should read: C. Correct: This naming convention would be the most logical for the view folder and view. A better choice (not shown as an answer) would be to use the RedirectToAction method which does not rely on routing conventions that can change. For example, RedirectToAction("Status", "Shipment"). -------------------------- Regarding your point about question 2: By default, this page would be in the Views\Home folder and would be Index.aspx. However, the question does not talk about the defaults. There is another issue, however. Page 876, question 2, should include the text, (Choose all that apply.) at the end of the question.

Moreno Gentili  Apr 03, 2011  Aug 19, 2011
Safari Books Online
876
Question #1, Option B

Typo, case sensitivity: return Redirect(...)

Note from the Author or Editor:
Valid, change B to "return Redirect("Shipment/Status")

Andras Vass  Jan 09, 2011  Feb 01, 2011
PDF
Page 881
Answer to 2nd question

It reads: "The form data is stored as part of the response packet." It should read: "The form data is stored as part of the request packet."

Note from the Author or Editor:
Valid, please change as described.

Bhavesh  Nov 19, 2011  Mar 02, 2012
PDF
Page 882
Lesson 2; Question 2

In Chapter 1, Lesson 2, on page no 16, It is mentioned that 'You cannot mix Visual Basic and CS' in a web application. Where as the answer of Question 2 in page 32, is privided as 'A' that is one can add .VB files in a CSharp project. Is this correct?

Note from the Author or Editor:
This isn't a mistake, but we could clarify the answer explanation. Change the first sentence of answer A to: "Unlike ASP.NET Web applications, ASP.NET websites can contain pages that use different languages."

Varun Sharma  Mar 17, 2011  Aug 19, 2011
Printed
Page 883
Case Scenario 1: Answer 2

Case Scenario 1 (p. 39) specifies the development server is running Windows Server 2008 R2. The answer to part 2 suggests managing IIS on that server with HTTP. This is confusing as pages 18 and 19 explicitly say you cannot use HTTP to create a website in 2008 R2 or IIS 7.5. It DOES say "you can publish the website across HTTP by using WebDAV," but this is treated as separate from HTTP-only, and the answer on p. 883 does not mention WebDAV.

Note from the Author or Editor:
Please remove, "which is easiest to manage using HTTP." (because it confuses the point of the question. The question isn't really about how to create the website; it's really about using the file system vs. IIS.

robertholt  Feb 16, 2011  Mar 01, 2011
Printed
Page 884
Lesson Review, Question 2

For page 59, the answer in the back of the book for question 2 of Chapter 2/Lesson 1 states that a @MasterType declaration is REQUIRED to access properties of a master page in a content page. This is incorrect, as a MasterPage can be cast to the correct type withinin the content page.

Note from the Author or Editor:
On page 884, please add the following to explanation 2A: "As an alternative to using the declarative syntax, you can specify the master page at runtime."

Anonymous  Jan 24, 2011  Mar 01, 2011
PDF
Page 889
Last line

In Page 889 Chapter 3 Lesson 3 Question 3 in D. Answer Is problem A And D Are The Same But in D Choise 2 time Write SqlServer A. Correct: You must manage session state on a central server in this case. StateServer or SqlServer allows you to do so. But In D. D. Correct: You must manage session state on a central server in this case. SqlServer or SqlServer allows you to do so. D Must BE => StateServer or SqlServer allows you to do so. But Mistake => SqlServer or SqlServer allows you to do so.

Note from the Author or Editor:
This is valid. Please change the answer explanation for Chapter 3, Lesson 3, Question 3 to "...StateServer or SqlServer allows you to do so" instead of "SqlServer or SqlServer..."

Ali Azhdari  Jun 12, 2011  Aug 19, 2011
Safari Books Online
902
answer to lesson review #1

The previous errata for this question stated that the correct answer was C, not B and C. While B. in Safari Books Online has been changed from Correct to Incorrect, the first sentence in the answer still reads Correct Answers: B and C. when it should read Correct Answer: C.

Dan  Apr 01, 2011  Aug 19, 2011
PDF
Page 902
Answer for first question in Lession 1

The question states: You are debugging an application on a test server. You have an issue on a particular page and need to get the error details. You do not want to turn on debugging for the entire site. What actions should you take? And the answer to that question is C and not B and C, bacause if you have to make the step that is described in B then the debuging is already on and you don't need to do anything. "You do not want to turn on debugging for the entire site." = means that the <compilation debug="false"> is used already.

Note from the Author or Editor:
Correct, we need to make this change. Just a typo. Please change "B. Correct" to "B. Incorrect"

Anonymous  Jan 13, 2011  Feb 01, 2011
Printed, PDF, Safari Books Online
Page 906
Lesson 2 Answer for number 1

The question for number 1 is how to register a class to be used as an extension to a DOM element, not how to create an AJAX UI control. According to page 502, 2nd to last paragraph states this to be Sys.UI.Behavior as opposed to Sys.UI.Control. The answer should be D, not A.

Note from the Author or Editor:
On page 906, the answers to Lesson 2, Question 1 should change as follows: 1. Correct Answer: D A. Incorrect: You derive from the Sys.UI.Control class to create an AJAX UI Control (not a DOM extension). B. Incorrect: This call simply indicates that you intend to implement the IDisposable interface. It does not indicate proper inheritance for extending a DOM element. C. Incorrect: This call creates your class without inheritance. To extend a DOM element, you should inherit from Sys.UI.Behavior. D. Correct: This call creates a control that extends a DOM element.

Pete  Jul 13, 2011  Aug 19, 2011
Safari Books Online
915
Lesson 12.1 review question 4

The question is a bit ambiguous and the marked correct answer is B, even though this is technically not correct. I see two possible solutions, one would be to use answers C and D, to produce something like this: <asp:EntityDataSource ID="NorthwindEntityDataSource" runat="server" ConnectionString="name=NorthwindEntities" DefaultContainerName="NorthwindEntities" EnableFlattening="False" EntitySetName="Customers" Where="it.CustomerID=@CustomerID"> <WhereParameters> <asp:QueryStringParameter QueryStringField="custId" Name="CustomerID" DbType="String"/> </WhereParameters> </asp:EntityDataSource> If the question is to specify a query that uses a custom Entity SQL expression, then a CommandText must be used, but B is still not the complete answer. Alongside with B the user would also have to define CommandParameters and specify the parameter, something like this: <asp:EntityDataSource ID="NorthwindEntityDataSource" runat="server" CommandText="SELECT c.CustomerID, c.CompanyName, c.Phone FROM Customers AS c WHERE c.CustomerID=@CustomerID" ConnectionString="name=NorthwindEntities" DefaultContainerName="NorthwindEntities"> <CommandParameters> <asp:QueryStringParameter QueryStringField="CustomerID" Name="CustomerID" DbType="String"/> </CommandParameters> </asp:EntityDataSource> Or am I wrong in assuming that an EntityDataSource with CommandText using parameters, and no parameters supplied with <CommandParameters> will not work?

Note from the Author or Editor:
You are correct that the question assumes you are using <CommandParameters>. However, we will make changes to make the question more clear. First, p. 720, question 4, change answer D to read: D. Add a CommandParameters section to the EntityDataSource control markup. p. 915, change question 4 to Correct Answer B and D. Change D to read: D. Correct: You use a CommandParameters section to define a parameter to used inside the CommandText query. You reference the parameter in the query using the construct, @ParamName.

crótach  Mar 29, 2011  Aug 19, 2011
Printed
Page 921
final code sample

I believe the following is missing from within <system.web>: <identity impersonate="true"/> If the above is not required, then some text explaining why it is not required would be helpful.

Note from the Author or Editor:
Right. Please add: <identity impersonate="true"/> below <system.web> in the final code sample on page 921. Indent it to the same level as the <authentication mode="Windows" />

Anonymous  Apr 19, 2011  Aug 19, 2011
Printed
Page 923
D

D. Correct: This will create a route that includes the default values for calling DefaultController and the Default action method (which will return the Defaul.aspx view). Should be: Default.aspx (with "t")

Note from the Author or Editor:
Correct, the t is missing from default.aspx in answer 2D on page 923.

Anonymous  Aug 05, 2011  Aug 19, 2011
Printed
Page 1007
Practice Tests on the CD

Not sure if I should report errata for the Practice Tests here. [QUESTION 515P_1.2_04] The correct answer has a mistake, in fact the @Master directive has no "master" attribute that can be set. Instead, the MasterPageFile attribute should be used: <%@ Master Language="C#" MasterPageFile="~/Blue.master" /> Source: http://msdn.microsoft.com/en-us/library/x2b3ktt7%28v=vs.80%29.aspx [QUESTION 515P_2.2_03] The correct answer is incomplete. The consumer method GetStockSymbols() should have a string parameter to match the return type of the provider method. [QUESTION 515P_1.5_04] The Reference paragraph states that the asp:SqlDataSource is covered in Chapter 2, Lesson 3 of the book. However, there's no mention of that control in the second chapter of the book. The first time it's mentioned is in chapter 9, and properly covered in chapter 12.

Note from the Author or Editor:
These are all valid and the PTQs should be updated accordingly.

Moreno Gentili  Jan 09, 2011 
Safari Books Online
1007
Practice tests on the CD

Question ID 515P_6.3_05 "You are maintaining an MVC real estate application created by another developer. The MVC application tracks the current price of houses. Your company plans to update the application to track price changes. The original application developer followed common MVC structure conventions. You need to locate the file that must be updated to allow the application to track multiple prices. In which folder should you look for the file?" The correct answer is marked as "Models", but the explaination for "Controllers" makes a lot more sense: "If you were to display the price history on the user interface, you would need to update a controller. " Are you saying we need to update the application so that it DOESN'T show price history on the user interface? What is the purpose of that? Seems ambiguous to me.

Note from the Author or Editor:
This question was edited substantially after I submitted it, introducing the confusion. The original text of the question was: "You are a developer who has taken over maintaining an existing MVC real estate application. Recently, management decided to begin tracking price changes to houses. Currently, the application only tracks a house’s current price. You do not currently have plans to display the price history to users, but you do want to make the data available to your user interface developers. Assuming the previous developer followed common MVC structure conventions, in which folder should you look for the file that needs to be updated to allow the application to track multiple home prices?" The sentence that must appear in the question for it to make sense is: "You do not currently have plans to display the price history to users, but you do want to make the data available to your user interface developers."

crótach  Apr 19, 2011 
Safari Books Online
1007
Practice tests on the CD

Question ID: 515P_6.2_05 "You are creating a custom MVC action filter to cache action results. Which virtual method should you override?" The answer doesn't make any sense to me: "When you create a custom action filter by inheriting from the ActionFilterAttribute class, you can override four virtual methods that run in the following order: OnActionExecuting(), OnActionExecuted(), OnResultExecuting(), and OnResultExecuted(). For output caching, you want to capture the final rendered results. Therefore, you should override the last method to run: OnResultExecuting()." If that is the correct order then the last method to run isn't OnResultExecuting() but OnResultExecuted(). Also, why wouldn't you just use OutputCacheAttribute to cache the Action results instead? for example: [OutputCache(CacheProfile = "MyProfile", Duration = 10)] public ActionResult About() { ViewData["Message"] = "This page was cached at " + DateTime.Now; return View(); }

Note from the Author or Editor:
In the explanation, please change the final sentence from: "Therefore, you should override the last method to run: OnResultExecuting." to "Therefore, you should override the last method to run: OnResultExecuted." This was just a typo; the marked answer is correct. Re: using OutputCache; this is an option, however, the scenario wants to create a custom action filter. Presumably the developer needs some non-standard feature.

crótach  Apr 19, 2011 
Safari Books Online
1007
Practice tests on the CD

Question ID: 515P_3.4_02 It makes absolutely no sense. The example has only one button and the question mentions two buttons. Where is Button2? "You are developing an ASP.NET page that allows partial-page updates using nested UpdatePanel controls. Each UpdatePanel control displays the time it was last updated. The outer panel has contains a Button control, and the inner panel contains a Calendar control. The ASPX code is: <asp:ScriptManager ID="ScriptManager1" runat="server"> </asp:ScriptManager> <asp:UpdatePanel ID="OuterPanel" runat="server" > <ContentTemplate> Last refresh <%=DateTime.Now.ToString() %> <br /> <asp:Button ID="Button1" runat="server" /> <asp:UpdatePanel ID="InnerPanel" runat="server" > <ContentTemplate> Last refresh <%=DateTime.Now.ToString() %> <br /> <asp:Calendar ID="Calendar1" runat="server"></asp:Calendar> </ContentTemplate> </asp:UpdatePanel> </ContentTemplate> </asp:UpdatePanel> You want the update panels to behave as follows: * When a user either Button control, both UpdatePanel controls are updated. * When a user updates the calendar, only the inner update panel is updated. * The date the user selects in the calendar control is maintained regardless of which button is pressed. Which of these properties should you define? (Each correct answer presents part of the solution. Choose two.)" Add an AsyncPostBackTrigger to OuterPanel.Triggers for Button2. Set Calendar1.EnableViewState to False. Set InnerPanel.ChildrenAsTriggers to False. Set OuterPanel.UpdateMode to Conditional.

Note from the Author or Editor:
Please change "When a user either Button control", to "When a user clicks the Button control"

crótach  Apr 24, 2011