Wiley.com
Print this page Share

Beginning ASP.NET 4: in C# and VB

ISBN: 978-0-470-50221-1
Paperback
848 pages
March 2010
Beginning ASP.NET 4: in C# and VB (0470502215) cover image
This title is out-of-print and not currently available for purchase from this site.

Do you think you've discovered an error in this book? Please check the list of errata below to see if we've already addressed the error. If not, please submit the error via our Errata Form. We will attempt to verify your error; if you're right, we will post a correction below.

ChapterPageDetailsDatePrint Run
Service Pack 1
Service Pack 1 for Visual Web Developer 2010 Express and Visual Studio 2010 introduces a change in the way the Visual Basic editor writes methods for you in the Code Behind of your pages. The editor no longer adds the ByVal keyword to new methods it creates. Since ByVal was already the default for method parameters, this change doesn't affect your code. Whenever you see ByVal used in the book, you can choose to type the code as shown in the book, or you can leave out the ByVal keyword as VWD 2010 / VS 2010 do when writing new methods.

For a detailed explanation of the issue, check out this forum post:
http://p2p.wrox.com/book-beginning-asp-net-4-c-vb/83002-you-using-service-pack-1-visual-web-developer-2010-express-vs-2010-a.html
3/30/2011
xxxv Typo in Text
If you want to following along...

Should be:

If you want to follow along...
5/11/10
16 Error in Text
Under "The Main Menu," currently reads:
"Offline helps..."

Should read:
"Offline help..."
08/17/2012
34 Error in Text
Under "Creating Web Sites with VWD 2010," currently reads:
"...create different kind of sites..."

Should read:
"...create different kinds of sites"
08/17/2012
2 38 Error in Text
Chapter 2, page 38, step 5, second sentence should read:

The other two options (HTTP and FTP) enable you to open a site running on IIS (either on your local machine, or on a remote server using the so-called Microsoft FrontPage Server Extensions) and open a site from an FTP server, respectively.
07/26/2010
44 Error in Code
The table says that the file extension for the FileType ADO.net Entity Data Model is .dbml instead of .edmx
06/29/2010
71 Error in Text
In Figure 3-2:

h1
(
...
)

Should be:

h1
{
...
}

With curly brackets instead of parentheses
5/5/10
119 Error in Text
At the top of the page it reads "that they enables you" but it should be "that they enable you."

08/10/2010
5 148 Insert Text
after the last code block that shows how the use the Resize method, the following text should be inserted:

Because the compiler can determine the type of each element in the roles array, you don't have to explicitly specify the type in angled brackets. The following line of code would work equally well:

Array.Resize(ref roles, 3);

Under the hood, the compiler figures out the type (a string) and then actually calls Array.Resize(ref roles, 3).
8/10/11
169 Improved VB.NET Example
While the first VB code example runs fine as it is, it would align better with the C# example if AndAlso was used instead of And (since the C# example uses && instead of &). So the new example would read as follows:

VB.NET
Dim success As Boolean = False
Dim loopCount As Integer = 0
While Not success AndAlso loopCount < 3
success = SendEmailMessage()
loopCount = loopCount + 1
End While

Page 158 discusses the AndAlso and && operators.
9/13/11
209 Errors in text
the text:
Also during this phase, the control properties are loaded from View State and Control State again during a postback. So, for example, when you change the selected item in a DropDownList and then cause a postback, this is the moment where the correct item gets preselected in the drop-down list again, which you can then work with in your server-side code.

should be in the cell for the Load section, not for the Page initialization section. Therefore, the text under 'Page initialization' should read:

During this phase, the controls you have set up in your page or added programmatically become available. Additionally, the Page class fires three events: Init, InitComplete, and PreLoad.

And the text under load should read:

During this phase the page raises the Load event. Also during this phase, the control properties are loaded from View State and Control State again during a postback. So, for example, when you change the selected item in a DropDownList and then cause a postback, this is the moment where the correct item gets preselected in the drop-down list again, which you can then work with in your server-side code.
9/16/11
220 Error in Text
Page 220, in the paragraph above Figure 6-13, it reads "whose settings can be overridden by the individual pages". This should be: "whose settings can be overridden by the individual controls"
02/16/11
232 Error in Text
third paragraph, or just after
C#
Page.Theme = preferredTheme.Value;
this sentence should be rephrased:
"Because the theme is set early . . . to the end of the page, . . ."

Should say:
"Because the theme is set early in the page's life cycle, this setting is applied throughout the page, effectively giving the page the look and feel defined in it."
8/22/11
263 Error in Text
Second Paragraph in Programmatic Redirection.

Says: "The third option, Server.Transfer, executes at the client."

Should be: "...at the server" not client.
10/15/2010
279 Error in Text
In the Try it out Section (Registering User Controls in the web.config File). The 2nd sentence next to bullet point 1 reads: "If you're familiar with previous versions of ASP.NET you may find the web.config worrying empty". This should read "worryingly empty".
10/11/2010
8 285 Error in Reference
Step 5 of the Try It Out:
The paragraph references the src attribute twice. In both cases, this should be ImageUrl instead.
3/10/11
291 Change in Text
"by pressing F5" can be changed to "by pressing Control (Ctl) F5"

Ctrl+F5 is what we've been using up to this point. Just using F5 will work equally well, so is not really an error, but it starts the website in Debug mode. Debugging is not covered until Chapter 18.
9/9/11
6 312 Error in Text
After the script addition, the paragraph begins with:

"If you find that VDW"

It should be:

"VWD"

07/12/2010
9 316 Error in Code
Chapter 9, page 316 Under the heading "Understanding Request Validation" you see a way to turn off request validation using the ValidateRequest attribute on the page. However, in order for this to work, you also need to configure your application to use Request Validation the way it did in earlier versions of the .NET Framework. To do this, you need to add or update the <httpRuntime /> element in the web.config as follows:

<system.web>
...
<httpRuntime requestValidationMode="2.0" />
...
</system.web>

This puts validation in a 2.0 compatible mode, which makes Request Validation work as expected.
10/15/2010
344 Error in Note
in the Note section. The text currently reads:
"you can temporarily remove the UpdatePanel from the page, or uncomment its closing and opening tags"

but should read:
"you can temporarily remove the UpdatePanel from the page, or comment out its closing and opening tags"
9/13/11
368 Error in Text
The text in the book is:

"Initially developed and released by John Resig in January 2006, jQuery has grown to be a very popular client-side frameworks."

Which should be:

"Initially developed and released by John Resig in January 2006, jQuery has grown to be a very popular client-side framework."
06/22/2010
377 Error in Text
In the "Try It Out" Using Basic Selectors Number 4, it reads:

"...Design View, locate the cpClientScipt placeholder..."

Should be:

"...Design View, locate the cpClientScript placeholder..."
07/29/2010
397 Error in Text
Try It Out: Step 4, fourth sentence:
"CssClasss"

should be:
"CssClass" (with 2 s's instead of 3)
08/04/2010
436 Error in Text
first sentence of the last paragraph currently reads:
"...the next Try It Out shows you how to you create a very simple data-driven web page"

but should read:
"...the next Try It Out shows you how to create a very simple data-driven web page"
9/13/11
439 Error in Text
Right below Figure 13-5.

Text reads, "If the list with reviews ends up..."

Should read, "If the list with genres ends up..."
1/4/2012
495 Error in Text
Third paragraph, the third sentence begins "Using Eval you can get the value of the Title and assign it to the Literal, ..."

Should read "Using Eval you can get the value of the genre Name and assign it to the Literal, ..."
11/09/2010
533 Error in Code
The table lists the ASP.Net style RowStyle as the necessary style needed to change the Header of the GridView. This should be HeaderStyle.
08/17/2010
574 Error in Text
In the paragraph below the code example showing the Cache.Insert method the text should read as follows:
The first parameter of the Insert method is the cache key and the second parameter is the object you want to cache: the actual Review instance in this case. The third parameter enables you to hook up your cached item to some dependency such as a file or a database so the item is removed from the cache when the dependent object changes. This is not used in this example, so null (Nothing in VB) is passed. The fourth parameter defines the absolute expiration date: the date and time at which the item is considered outdated and has to be removed from the cache. In this example this date".. (text continues as printed here)
02/16/11
617 Error in Text
Second paragraph in summary:

In general, authentication encompasses three important concepts: identity, authentication, and authorization. Together, they determine who you are and what you are allowed to do.

The first "authentication" should be "security". This makes the paragraph:

In general, security encompasses three important concepts: identity, authentication, and authorization. Together, they determine who you are and what you are allowed to do.
08/17/2010
631 Error in Text
The second to last paragraph reads "With the tricks you learned in Chapter 15 you make the controls even more accessible by setting the AccessKey properties.".

This sentence should read "With the tricks you learned in Chapter 15 you could make the controls even more accessible by setting the AccessKey properties."
11/03/2010
18 669 Error in Code
step 10: The code reads:
<h1>Un unknown error occurred</h1>

But should read:
<h1>An unknown error occurred</h1>
4/7/11
11/Appendix A 743 Error in Code
There's an error in the jQuery code for the answer to question 1 of Chapter 11. Replace the code block that follows the text "In a script block below the last panel you need to add the following code:" with the following code:

$(function ()
{
  $('#HideBanner').bind('click', function ()
  {
    $('#VerticalPanel').slideToggle('fast', function ()
    {
      if ($(this).css('display') == 'block')
      {
        $('#HideBanner').text('Hide Banner');
      }
      else
      {
        $('#HideBanner').text('Show Banner');
      }
    });
  });
});
This code specifies a callback argument to slideToggle to run some code when slideToggle is ready. Inside the block that is executed, the display setting is checked, and the text of the link is updated accordingly. Notice how the code is now wrapped in function () { ... } so it's called when slideToggle is done.
9/14/2010
8 Error in Chapter 8 Figure
In the images of the Solution Explorer, file name currently reads: 468

Should read: 486
04/10/2012
6 Error in Code
In the Try Out in Chapter 6, the code currently reads:

Currently reads (with curly quotes):
CssClass="MyButton"

Should read (with straight quotes):
CssClass="MyButton"
12/27/2012
15 557 and 560 Text Correction
figure 15-14 is incorrect.
in the figure, the first letter of Summary (S) is underlined which does not match page 557, step number three, where the code indicates the 2nd letter (u) should be underlined. The code is correct, the figure is incorrect.
12/4/14
Back to Top