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 "Corrected".
The following errata were submitted by our customers and approved as valid errors by the author or editor.
| Version |
Location |
Description |
Submitted By |
Corrected |
| Printed |
Page 106
Last paragraph |
"Double-click btnHTML in Design view to create an event handler in the code-behind file."
Actually, double-clicking on the HTML button in the Design view does not create the event handler or the code-behind file. Instead it adds a second onclick attribute to the element in the source for the aspx file, which the previous paragraph had instructed the reader to add the attributes onclick="javascript:ButtonTest();" and onserverclick="btnHTML_ServerClick"; the second onclick attribute is set to "return btnHTML_onclick()". Here's what that element looks like after double-clicking on btnHTML in Design view:
<input id="btnHTML" type="button" value="HTML Button"
runat="server" onclick="javascript:ButtonTest();"
onserverclick="btnHTML_ServerClick"
onclick="return btnHTML_onclick()" />
Note from the Author or Editor: Change the last paragraph of page 106 to
"Right click the page in Design view to display the code behind file for the page and add the following lines of code."
|
Bob Kline |
|
| Printed |
Page 109
2nd paragraph of note section in middle of page |
"In both cases, you'll need administrative privileges to install it, and you can accept the default options."
Well, of course, you can accept the default options, but if you do the example won't work on Vista, because by default IIS7 is installed without support for ASP.NET.
Note from the Author or Editor: Change the final sentence of the second paragraph on p109 to
In both cases, you'll need administrative privileges to install it. XP Users can accept the default options but Vista users will also need to select ASP.NET to be installed.
|
Bob Kline |
|
| Printed |
Page 147
8 lines from the bottom (code list) |
The coordinates of the bottom PolygonHotSpot produce a polygon that does not align with the area in the image. It overlaps the 2nd polygon (too high) on the right side and is not high enough on the left side.
The error is in the Coordinates parameter. This segment in error is:
Coordinates="495,45,495,112,495,320,4,320"
This value should be changed to:
Coordinates="495,112,495,320,4,320,4,264"
Note from the Author or Editor: COordinates should be changed as noted above
|
Tony Thornton |
|
| Printed |
Page 174
1st paragraph |
The line in error is :
..., as shown in Example 4-34, ...
It should be changed to :
..., as shown in Example 4-32, ...
Note from the Author or Editor: As stated in the submitted errata, change "Example 4-32" to "Example 4-34"
|
bigqiang |
|
| Printed |
Page 184
1 line from the bottom |
The line in error is :
The values of the Target property are the same as those listed in Table 4-5 for the HyperLink control.
It should be changed to :
The values of the Target property are the same as those listed in Table 4-6 for the HyperLink control.
Note from the Author or Editor: As stated in the submitted errata, change "Table 4-5" to "Table 4-6"
|
bigqiang |
|
| Printed |
Page 189
18 line from the top |
The line in error is :
..., there is only a single BulletedList control and the ID is known to us: bltList.
It should be changed to :
..., there is only a single BulletedList control and the ID is known to us: bltBooks.
Note from the Author or Editor: As stated in the submitted errata, change bltList to bltBooks on line 18.
|
bigqiang |
|
| Printed |
Page 263
Code example (Ex 5-24) |
The FileUploadDemo has a coupla minor issues.
In btnSave_Click() the code has an
if (FileUpload1.HasFile)
{
...
}
else {
lblMessage.Text = "No file uploaded"; // NOTE THIS LINE
}
but this is never displayed to the user because a few lines later we see:
lblMessage.Text = str.ToString().
which overrides the prior assignment. The noted line should be:
str.Append("No file uploaded.");
which will be properly reported to the user.
--
This same issue appears in btnDisplay_Click() in the same example.
---
Also in btnSave_Click, there are two outputs of the same data:
str.AppendFormat("Saved as: {0}", FileUpload1.PostedFile.FileName);
...
str.AppendFormat("PostedFile FileName: {0}", FileUpload1.PostedFile.FileName);
The first one should probably be "FileUpload1.FileName";
Note from the Author or Editor: As stated in the submitted errata,
On p263, the line under "// show info about the file" should read
str.AppendFormat("Saved as: {0}", "<c:\\SaveDirectory>" + FileUpload1.FileName);
On p263, 7 lines up from the bottom of the page, change lblMessage.Text = "No file uploaded."; to read str.Append("No file uploaded");
On page 264, 6 lines from the bottom of the code listing, change lblMessage.Text = "No file uploaded."; to read str.Append("No file uploaded");
|
Steve Friedl |
|
| Printed |
Page 306
Last paragraph, continuing on to page 307 |
In the second sentence you say "Though the end result of the Response.Redirect and the cross-page post appears the same, there is a fundamental difference". The rest of the paragraph goes on comparing Response.Redirect and Server.Transfer. I believe where is says "Server.Transfer" it should say "cross-page post".
Note from the Author or Editor: Hi,
I think I would go with this errata and make the changes as suggested. The paragraph in question applies equally in measure to both Server.Transfer and cross-page posting - hence the confusion - but in context it should be talking about cross-page posts.
|
Daniel Powers |
|
| Printed |
Page 376
bottom paragraph on the page |
The text reads:
"However, to make your work easier you can ask your data source control to create the remaining SQL CREATE, UPDATE, and DELETE statements using a wizard."
But it should be INSERT, not CREATE.
Note from the Author or Editor: As stated in the submitted errata, change "CREATE" to "INSERT"
|
Steve Friedl |
|
| Printed |
Page 422
7 lines from the bottom |
Error is:
as listed earlier in Table 8-5.
It should be changed to:
as listed earlier in Table 8-6.
Note from the Author or Editor: Correction should be made as noted above.
|
bigqiang |
|
| Printed |
Page 423
2 lines from the bottom |
The error is EmptyDataText'Description in the Table 8-11.
Error description is:
Sets the text displayed by the DetailsView if the DataSource it is bound to returns no data to display
It should be changed to:
Sets the text displayed by the GridView if the DataSource it is bound to returns no data to display.
Note from the Author or Editor: As noted above, the word DetailsView should be changed to the word GridView in the Description of the EmptyDataText property
|
bigqiang |
|
| Printed |
Page 424
19 lines from the top |
The error is EmptyDataText'Description in the Table 8-11.
Error is:
Sets the CSS class name for the table generated by the DetailsView control.
It should be changed to:
Sets the CSS class name for the table generated by the GridView control.
Note from the Author or Editor: The description of the CssClass property on p424 should start with "Sets the CSS class name for the table generated by the GridView control."
|
bigqiang |
|
| Printed |
Page 427
14 lines from the bottom |
The error is:
Figure 8-17 shows the results of running the page and selecting the first row.
It should be changed to:
Figure 8-17 shows the results of running the page and selecting the third row.
Note from the Author or Editor: Please make change as noted in the errata above
|
bigqiang |
|
| Printed |
Page 430
lines 11,12 from the top |
The error is:
Extends the BoundField to render (a combination of) fields as hyperlinks in the DetailsView.
It should be changed to:
Extends the BoundField to render (a combination of) fields as hyperlinks in the GridView.
Note from the Author or Editor: Please make change as noted in the errata above
|
bigqiang |
|
| Printed |
Page 430
17 lines from the bottom |
The error is:
change their command types depending on the current mode of the DetailsView.
It should be changed to:
change their command types depending on the current mode of the GridView.
Note from the Author or Editor: Please make change as noted in errata above.
|
bigqiang |
|
| Printed |
Page 449
17 lines from the top |
The error is :
Example 8-11. Repeater.aspx.cs in full
It should be changed to :
Example 8-11. Repeater.aspx in full
Note from the Author or Editor: Please make change as noted in errata above.
|
bigqiang |
|
| Printed |
Page 454
12 lines from the top |
The error is :
ItemTemplate will be used for every item in the DataList.
It should be changed to :
ItemTemplate will be used for every item in the ListView.
Note from the Author or Editor: Please make change as noted in errata above.
|
bigqiang |
|
| Printed |
Page 478
2nd line from the bottom |
The error line is:
// between Bug and Order Details on the OrderID key
It should be changed to:
// between Order and Details on the OrderID key
Note from the Author or Editor: As stated above, the second line of text on the page
// between Bug and Order Details on the OrderID key
should be changed to
// between Order and Details on the OrderID key
|
bigqiang |
|
| Printed |
Page 480
10,11 lines from the top |
The line in error is :
When OrderGridView was added to DataRelations.aspx, its DataKeyValues property was set to OrderID.
It should be changed to :
When OrderGridView was added to DataRelations.aspx, its DataKeyNames property was set to SalesOrderID.
Note from the Author or Editor: Please make change as noted in errata above.
|
bigqiang |
|
| Printed |
Page 480
2rd paragraph |
When OrderGridView was added to DataRelations.aspx, its DataKeyValues property was set to OrderID. When called, the UpdateDetailsGrid method asks the OrderGridView for its DataKeys collection. This returns a collection of the fields set in DataKeyValues for the row currently selected on the GridView-or in brief, the OrderID for the order currently selected in OrderGridView.
-------------------------
The "DataKeyValues" in error line should be changed to "DataKeyNames".
Note from the Author or Editor: Please correct as noted in the errata. p480, 2nd para.
Change "This returns a collection of the fields set in DataKeyValues for the row..." to
"This returns a collection of the fields set in DataKeyNames for the row..."
|
bigqiang |
|
| Printed |
Page 505
various methods in this chapter's section |
in the click event handler methods of the Add and Edit buttons, you pass a value of type StringBuilder to the UpdateDB method which only accepts an argument of type string, as does the SqlCommand type, respectively. you can keep the command strings as type StringBuilder for all of the event handler methods if you wish to be consistent, and change UpdateDB's cmdString argument to be of type StringBuilder, however, you then must convert the string argument to be of type string inside the UpdateDB method in order to feed it to SqlCommand:
SqlCommand command = new SqlCommand(cmdString.ToString(), connection);
which means you would also have to update the Delete button's click event handler method's deleteCommand variable to be of type StringBuilder as well when passing it onto the UpdateDB method, otherwise you'll get build errors.
Note from the Author or Editor: Change the btnAdd_Click, btnEdit_Click and btnDelete_Click functions on page 505 to the following
protected void btnAdd_Click(object sender, EventArgs e)
{
String insertCommand = String.Format("insert into SalesLT.ProductCategory ([ParentProductCategoryID], [Name]) values ('{0}', '{1}')",
ddlParentCategory.SelectedValue, txtName.Text);
UpdateDB(insertCommand);
PopulateGrid();
}
protected void btnEdit_Click(object sender, EventArgs e)
{
String updateCommand = String.Format("Update SalesLT.ProductCategory SET Name='{0}', ParentProductCategoryID='{1}' where ProductCategoryID='{2}'",
txtName.Text, ddlParentCategory.SelectedValue, hdnCategoryID.Value);
UpdateDB(updateCommand);
PopulateGrid();
}
protected void btnDelete_Click(object sender, EventArgs e)
{
string deleteCommand = String.Format("delete from SalesLT.ProductCategory where ProductCategoryID ='{0}'", hdnCategoryID.Value);
UpdateDB(deleteCommand);
PopulateGrid();
}
|
Rey de la Torre |
|
| Printed |
Page 505
btnEdit_Click event handler method |
When creating or appending to StringBuilder types on a new line, you cannot use {1} or {2}; they must start at {0} again:
updateCommand.AppendFormat("Name='{0}', ", txtName.Text);
updateCommand.AppendFormat("ParentProductCategoryID='{1}' ", ddlParentCategory.SelectedValue); // this line produces a zero-base FormatException error
however, when changing {1} to {0} due to a new call to updateCommand.AppendFormat(), the error goes away and the page behaves as expected.
Note from the Author or Editor: Change the listing for btnEdit_Click on page 505 to...
protected void btnEdit_Click(object sender, EventArgs e)
{
String updateCommand = String.Format("Update SalesLT.ProductCategory SET Name='{0}', ParentProductCategoryID='{1}' where ProductCategoryID='{2}'",
txtName.Text, ddlParentCategory.SelectedValue, hdnCategoryID.Value);
UpdateDB(updateCommand);
PopulateGrid();
}
|
Rey de la Torre |
|
| Printed |
Page 609
1rd paragraph |
The following link is invalid:
http://www.iis.net/go/928,
http://www.iis.net/go/1023,
http://www.iis.net/go/1027
So, pls update these link.
Note from the Author or Editor: Please replace the three links above with the following.
http://learn.iis.net/page.aspx/243/aspnet-integration-with-iis7/
http://learn.iis.net/page.aspx/244/how-to-take-advantage-of-the-iis7-integrated-pipeline/
http://learn.iis.net/page.aspx/377/using-aspnet-forms-authentication/
|
bigqiang |
|
| Printed |
Page 694
2rd paragraph |
The line in error is :
..., and the Text property of that SiteMapNode returns that SiteMapNode's title.
It should be changed to :
..., and the Title property of that SiteMapNode returns that SiteMapNode's title.
Note from the Author or Editor: In the 2nd paragraph, replace "and the Text property of that SiteMapNode returns that SiteMapNode's title." with "and the Title property of that SiteMapNode returns that SiteMapNode's title."
|
bigqiang |
|
| Printed |
Page 738
14 lines from the bottom |
The line in error is :
Example 14-12 DisplayMode.aspx in full
It should be changed to :
Example 14-12 DisplayModeMenu.ascx in full
Note from the Author or Editor: Change the caption for the code sample at the bottom of page 738 to Example 14-12 DisplayModeMenu.ascx in full
Change the caption for the code sample at the bottom of page 739 to Example 14-13 DisplayModeMenu.ascx.cs in full
|
bigqiang |
|
| Printed |
Page 1095
line 17-24 from the top |
The error is:
... Debug > Windows > Watch > Memory 1 ...
... Debug > Windows > Watch > Memory 2 ...
... Debug > Windows > Watch > Memory 3 ...
... Debug > Windows > Watch > Memory 4 ...
It should be changed to:
... Debug > Windows > Memory > Memory 1 ...
... Debug > Windows > Memory > Memory 2 ...
... Debug > Windows > Memory > Memory 3 ...
... Debug > Windows > Memory > Memory 4 ...
Note from the Author or Editor: As stated above, change
... Debug > Windows > Watch > Memory 1 ...
... Debug > Windows > Watch > Memory 2 ...
... Debug > Windows > Watch > Memory 3 ...
... Debug > Windows > Watch > Memory 4 ...
to
... Debug > Windows > Memory > Memory 1 ...
... Debug > Windows > Memory > Memory 2 ...
... Debug > Windows > Memory > Memory 3 ...
... Debug > Windows > Memory > Memory 4 ...
|
bigqiang |
|