Errata

Programming ASP.NET

Errata for Programming ASP.NET

Submit your own errata for this product.

The errata list is a list of errors and their corrections that were found after the product was released.

The following errata were submitted by our customers and have not yet been approved or disproved by the author or editor. They solely represent the opinion of the customer.

Color Key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update

Version Location Description Submitted by Date submitted
Printed Page 27
Second and Fourth Paragraph

The shortcut for Project... (Ctrl-Shift-N) is actually (Ctrl-N) in the software

The shortcut for File... (Ctrl-N) does not exist in the software

Anonymous  Oct 24, 2008 
Printed Page 85
Third paragraph (just after Example 3.3)

<!-- <DEFANGED_STYLE>@import url(StyleSheet.css); --> </DEFANGED_STYLE>
returns an error.

Validation (XHTML 1.0 Transitional): Element 'style' is missing required attribute
'type'.
This line should probably look like:
<!-- <DEFANGED_STYLE type="text/css">@import url(StyleSheet.css); -->
</DEFANGED_STYLE>

Anonymous   
Printed Page 92
Example 3-5 Controls in Default.aspx for ClientSideProcessing

I'm using the latest VS 2005 IDE and it doesn't have an onChange event for the asp:TextBox web control. However; it does contain an OnTextChanged event handler. Not sure what the event is called with the express ide but wanted to pass this alone....

<asp:TextBox ID="TextBox1" runat="server" OnChange="javascript:DoChange();"></asp:TextBox>

Anonymous   
Printed Page 124
Table 4-7

CellPadding and CellSpacing have identical descriptions. Is this deliberate or accidental?

Anonymous   
Printed Page 147
1st paragraph - in C# code

I think I found a minor bug in BulletedListDemo code (p. 145).

'NotSet' doesn't appear to be a legal value for the BulletedListDisplayMode. However, it's a choice in the DisplayMode listbox. If 'NotSet' selected the following error occurs:

Server Error in '/BulletedListDemo' Application.
--------------------------------------------------------------------------------

Requested value 'NotSet' was not found.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ArgumentException: Requested value 'NotSet' was not found.

Source Error:

Line 41:
Line 42: case "lbDisplayMode":
Line 43: BulletedListDisplayMode displayMode =
Line 44: (BulletedListDisplayMode)Enum.Parse(
Line 45: typeof(BulletedListDisplayMode), strValue);

Source File: c:WebSitesBulletedListDemoDefault.aspx.cs Line: 43

Anonymous   
Printed Page 167
C# code

The text of the pnlScroll panel overlays the dropdownlist and radiobutton list that control the panel when the scrollbar dropdown list is set to 'None' and the Wrop radiobuttonlist is set to 'True.

This occurs is both IE and Firefox.

Anonymous   
Printed Page 174
Example 4-36

The drop down list (example 4-36) should contain a list item with text "Middle" between "Baseline" and "TextTop". The code-behind (example 4-37) seems to assume that entry is in the drop down list.

Anonymous  Nov 06, 2008 
Printed Page 180
End of example 4-38

The coordinates for the final PolygonHotSpot should probably begin with 4,265,... rather than 495,45,... It would more accuratley reflect the area underneath the band.

Anonymous  Nov 06, 2008 
Printed Page 192
ASP.NET code at bottom of page

Wizard control is called "Wizard1" here but referred to as "wzzrdMorning" in rest of text and code for this demo.

Anonymous   
Printed Page 218
paragraph under Figure 5-14

The last sentence reads "... by clicking on the and navigation symbols". It was probably should read "... on the < and > navigation..."

Anonymous  Nov 07, 2008 
Printed Page 235
2nd paragraph

"A call is made to the lblSelectedUpdate method to clear the Label control containing the first selected date...."

The above doesn't occur with the downloaded Calendar-MoreSelections code. The label doesn't get cleared.

I had to add the following to the end of the lblSelectedUpdate() method to get it to work:
if (Calendar1.SelectedDates.Count == 0)
lblSelected.Text = "";

Anonymous   
Printed Page 255
First Paragraph

I believe that your explanation in this paragraph of how Cross-page posting and
Response.Redirect is backward. Response.Redirect DOES post to the server and then
the server redirects the user, via an HTTP redirect, to TargetPage.aspx within
btnRedirect_Click. Cross-page posting, given your explanation, does not post to the
server.
Actually, saying that these buttons do not "post to the server" is a bad way of
explaining what is going on. Response.Redirect posts to Default.aspx and Transfer
posts to Default.aspx. Cross-page posts to TargetPage.aspx. They all all post back
to the server. Transfer uses a "server-side transparent to the client redirect" and
Response.Redirect uses an HTTP redirect seen by the client.

Anonymous   
Printed Page 297
Last paragraph

Text in book:
"Page-Level Tracing........but the SessionID remains constant."

I'm following the examples in the book by creating new web sites in my local file system (as preferred by the book). My Session ID changes everytime the page is posted back to the server. Perhaps this wouldn't happen if IIS were serving the page.

Anonymous   
Printed Page 307
Table 7-3

The picture displayed for the "Step Into" icon is incorrect. It shows a drop-down box with the word "Statement" rather than a picture of the actual "Step Into" icon.

Anonymous  Nov 13, 2008 
Printed Page 327
Example 8-1

The Page directive does not include the ClientTarget attribute (as referenced on page 325). Therefore the btnSubmit_Click function (bottom page 331) will never execute until the page is completely valid (or the application is running in a "downlevel" browser). The means the "Some of the required fields are empty" string is never displayed in lblMsg.

Anonymous  Nov 13, 2008 
Printed Page 335
2nd paragraph, first line, last word

"made a new copy of the RequiredValidationSummary protect"

I think the word protect should be project.

Anonymous   
Printed Page 359
1st paragraph

Text:
"You will be asked to update your grid, which unfortunately will wipe out all your customization...."

This didn't happen when I tried it. My customizations remained.

Anonymous   
Printed Page 366
2nd paragraph

Text:
"....change from Edit and Delete to Save and Cancel."

They change to Update and Cancel.

Anonymous   
Printed Page 366
366

The NULL data in the Region column caused an exception and wouldn't allow updating if Optimistic Concurrency was turned on. I'm not sure why this happened.

Anonymous   
Printed Page 366
1st paragraph

My version of the page wont save any updates as long as optimist concurrency is selected. When this is unselected as an option, the page works fine.

Anonymous   
Printed Page 366
bottom of the page

The attempt to update the database fails when Optimistic Concurrency is turned on using the Configure Data Source wizard. This is because there are null values in the Northwind DB used in the example. (i.e. "WHERE ... [Region] = @Original_Region..." yields "null = null" which always returns false) It took a fair amount of time to figure this one out.

Anonymous  Nov 17, 2008 
Printed Page 373
Last paragraph

Text:
"The DataGrid allows you to...."

I think you meant the "GridView".

Anonymous   
Printed Page 381
1st paragraph

Book Text:
"(replace the control and the ID)"

It doesn't seem necessary to replace the ID. The ID is already correct.

Anonymous   
Printed Page 397
2nd paragraph

Book Text:
"<h1> Form View Display</h1>

Should be "<h1> Product View Display</h1>" as this is how it appears in remaining examples.

Anonymous   
Printed Page 423
Top

The DataRelations code example doesn't include the !IsPostBack check in the Page_Load method.

Anonymous   
Printed Page 424
Middle of page

Book Text:
"// and add the table mapping for bugs

What is "bugs"? I believe this should be "Orders".

Anonymous   
Printed Page 425
Middle of page

What is the reason for creating a third data adaptor that maps to the 'Products' table when this DataTable is never bound to a GridView?

Anonymous   
Printed Page 425
5th code section

dataColumn2 = dataSet.Tables["Order Details"].Columns["OrderID"]; throws a Null Reference Exception. If I comment out the line and all other lines relating to the 3rd data adapter the application runs fine without the third relations box. the next section where the dataColumn variables are re-used throws the same exception.

Anonymous  Sep 18, 2008 
Printed Page 455
Middle of page

Book Text:
"// and add the table mapping for bugs"

"bugs" should be "Shippers"

Anonymous   
Printed Page 455
Bottom of page

Book Text:
"// end createDataSet"

"createDataSet" should be "PopulateGrid"

Anonymous   
Printed Page 457
Bottom of page

1) Page_Load event is blank in downloaded code sample of UpdatingDBDirectly.

2) Printed Page_Load event at bottom of page is incorrect (appears to be code from previous DataRelations example).

Should be:
protected void Page_Load(object sender, EventArgs e)
{
PopulateGrid();
}

Anonymous   
Printed Page 468
Top

Book Text:
"// connection string to connect to the Bugs database"

Should be:
"// connection string to connect to the Northwind database"

Anonymous   
Printed Page 469
Top

Book Text:
"// set up the command object to update the bug history"

Should be deleted.

Anonymous   
Printed Page 469
Bottom of page

Book Text:
"// create a second command object for the bugs history table"

Should be:
" // declare the command object for the sql statements"

Anonymous   
Printed Page 475
top of page Example 10-15

The stored procedure spAddOrder as listed does not return a value for the output parameter @OrderID. Because of that the line "OrderID = Convert.ToInt32(command.Parameters["@OrderID"].Value);" in the UpdateConnectionTransaction method causes an exception (trying to convert null parameter value @OrderID to an int value). Consequently the connection transaction is rolled back on every attempt.
Adding the line "select @OrderID = @@identity" to the end of the spAddOrder stored procedure will fix the problem.

Anonymous  Nov 21, 2008 
Printed Page 526
2nd paragraph

Book Text:
"Create two new .aspx pages, Welcome.aspx and PageTwo.aspx."

Should be:
"Create two new .aspx pages, Welcome.aspx and SecondPage.aspx."

Anonymous   
Printed Page 527
2nd paragraph

Book Text:
"When you create SecondPage.aspx,...."

Should be:
"When you create PageTwo.aspx,....."

Anonymous   
Printed Page 528
2nd paragraph

Book Text:
"..as shown in the highlighted lines of code in Example 12-2"

Not enough lines have been highlighted in Example 12-2.

Anonymous   
Printed Page 529
In Example 12-2 code

Book Text:

CodeFile="ASP.NET.master.cs"

I believe it should instead be:

CodeFile="ASPNET.master.cs"

Anonymous   
Printed Page 530
1st paragraph

Book Text:
"...(shown highlighted in Example 12-2)"

Anonymous   
Printed Page 541
1st paragraph

Book Text:
"To begin with, you may click the Smart Tag....."

I needed to move the TreeView control out of the table before it became visible in Design view.

Anonymous   
Printed Page 545
Bottom of page

Programming.aspx in downloaded source files has AutoEventWireup="false" which doesn't allow the Page_Load to handle the event in Programming.asp.cs.

Anonymous   
Printed Page 551
top of page

The tip reads "Rules are covered...". I believe it should read "Roles are covered...".

Anonymous  Dec 02, 2008 
Printed Page 563
middle of the page

In example 3-12 the text boxes are renamed, but the save_Click method shown on page 563 still references the original names.

Anonymous  Dec 02, 2008 
Printed Page 568
end of first paragraph

In the middle of the paragraph it reads "... you must modify your save_Click event handler..." but it should read "... you must modify your Page_Load event handler..."
The snippet shown under the paragraph is the Page_Load method. Changes to the save_Click method are displayed on page 570.

Anonymous  Dec 02, 2008