Errata

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.

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
1
Practice Test Question 515P-4.8_01

Somebody has submit this error on June 10,211 ( a year ago!)
Where is the exhibit code?

Melania  Jul 13, 2012 
Printed Page 13
1

Bing is not returning an error code of 200 as stated in the book.

Anonymous  Jun 07, 2013 
Printed Page 32
Lesson Review, Question 1

Question
If you want to create a website on a remote computer running IIS 6.0 that does not have Front Page Server Extensions installed, which website type will you create.

Answer C : FTP

WebDav is not possible (you need iis 7.5)
Http is not possible (you need front page extensions)


But what is wrong with with answer B. File System ?

On page 18, it is said that a file system based website is preferred over a FTP website.

On page 18 you have a paragraph.
Creating a file system based website on a server.
It starts like a normal folder share but at the end suddenly a WebDav network drive is mentioned.

On Page 18 you have another paragraph
Creating a file system based website with webdav.
The easiest way to publish to a server is to map a drive to the server. If firewall restrictions prevent you from mapping a drive, you can publish the website across HTTP by using WebDav.


Anonymous  Jun 04, 2012 
Printed, PDF Page 53
Point 2, Sample of Visual Basic Code

Session("masterpage") = "~Master2.master"

should read

Session("masterpage") = "~/Master2.master"

Bret McGee  Nov 13, 2012 
Printed, PDF Page 66
Just below first paragraph

<link href="SiteStyles.css" rel="themeName/stylesheet" type="text/css" />

should read

<link href="SiteStyles.css" rel="stylesheet" type="text/css" />

Bret McGee  Nov 13, 2012 
PDF Page 83
Bottom

CHANGE

VaryByParam="ctl00$MainContent$ChoiceDropDownList;ctl00$MainContent$UserNameTextBox"

TO

VaryByControl="ctl00$MainContent$ChoiceDropDownList;ctl00$MainContent$UserNameTextBox"

Per Hygum Due  Mar 27, 2012 
Printed Page 83
2nd paragraph

In the text it reads 'cache a page for 900 seconds', but in the code the value is set to 15 seconds (Duration="15").

Duration="15" should be changed to Duration="900" a few times on this page.

(Note: This has already been changed , but still wrong in the print edtion from 2011-08-19)

Tonino F.  Apr 15, 2012 
Printed Page 92
Australia

In final lesson review for Chapter 2 the following question appears:

"4. Which tool [sic] can you use to create a cache dependency? (Choose all that apply.)"

Page 886 provides answers as B, C, and E. C answer is given as "C. A time span".

Answer description for answer C:

"C. Correct: You can make a Cache object expire after a specific time span or at a specific time."

Yes this is correct, but the question specifically asked for Cache Dependencies. The overloads for "new System.Web.Caching.CacheDependency()" allow at most file paths, cache keys, and cache objects (and a monitor start time).

A time dependency is set via the absoluteExpiration parameter which is separate from cache dependencies, so option C is NOT a valid answer.

Poorly phrased question regardless, none of the answers are "tools".

David Anderson  Apr 23, 2012 
PDF Page 106
1st paragraph under "Creating Custom Controls"

It implies that if you added controls dynamically in PreInit then you don't need to call ApplyStyleSheetSkit. But that's not the case. I don't need to call ApplyStyleSheetSkit in any of PreInit, Init, or Load when I use Theme & inversely I have to call in all 3 event handlers if I use StyleSheetTheme. Sorry dear but I think I'm right. :)

Bhavesh  Mar 25, 2012 
PDF Page 106
Table 3.1 - SaveStateComplete event

In the PDF, the description for the SaveStateComplete event says that: "Any changes to the page?s controls at this point or beyond are
ignored.".

In the MSDN documentation, the SaveStateComplete's description looks like this:
"Any changes to the page or controls at this point affect rendering, but the changes will not be retrieved on the next postback."

There is an obvious contradiction between the two statements.

You can make canges to the controls in the page until the base class Render method of the page is called and the markup is generated.

Can you clarify the description for this event, please?

Bogdan Pirau  Oct 29, 2012 
Printed Page 139
exercise box

the cookies have to be created with .add method, is not like session who need just a key

claudio m.u. milano  Mar 27, 2012 
PDF Page 146
Sample of C# Code

The cast is not needed.

Bhavesh  May 19, 2012 
PDF Page 146
web.config code

mode="Off", not mode="off"

Bhavesh  May 19, 2012 
PDF Page 147
example.com link

http://www.example.com/s(lit3py55t21z5v55vlm25s55)/orderform.aspx

SHOULD BE

http://www.example.com/(S(lit3py55t21z5v55vlm25s55))/orderform.aspx

BOTH THE EXTRA PAIR OF PARENTHESES & THE CAPITAL "S" ARE NECESSARY

Bhavesh  May 20, 2012 
Printed Page 184
C# and VB code (on page 183)

All instances of <br> should be replaced with <br /> so the output page generates valid XHTML?

Bret McGee  Nov 28, 2012 
PDF Page 197
3rd paragraph

The Calendar control can be used to select a single date or multiple dates. The SelectionMode
property controls this. It can be set to one of the following settings:
&#9632; Day Allows selection of a single date
&#9632; Week Allows the selection of either a single date or a complete week
&#9632; WeekMonth Allows selection of single date, a complete week, or the whole month
&#9632; one Does not allow you to select any date

In the above code, In the Calendar Control there is no selection mode like "WekMonth" instead it is "DayWeekMonth"

VAISHALI JAIN  Oct 19, 2013 
PDF Page 199
Example

The correct event handler for this example should be Page_Init instead of Page_Load to allow the calendar control to maintain the visible month across postbacks.

For example, if you change the month to February and select 15, when the browser receives the response, the displayed month will be January.

Moving the code to the Page_Init event handler will make the calendar display February instead.

The same should correction should be made to the C# code, at page 200.

Bogdan Pirau  Oct 31, 2012 
Printed Page 203
Third paragraph

MaxRequestLength

should read

maxRequestLength

(error in two places)

Bret McGee  Feb 19, 2013 
Printed Page 203,204
Second paragraph and code

Paragraph 2 refers to HttpServerUtility class and the MapPath method.

This does not agree with the code example which is calling the MapPath method within the Page class itself.

The code should probably use Server.MapPath() to agree with paragraph #2 on page 203

Bret McGee  Feb 19, 2013 
PDF Page 205,206
In the Figure 4-16 screenshot.

Figure 4-16 screenshot.

CHANGE Logon TO Login.

"Login" is used in HTML markup, C# and VB code on p205 and p206.

Per Hygum Due  Feb 24, 2012 
PDF Page 205
5th line of code sample

with the istruction

onclick="ButtonShowHide_Click

Button click event handler is fired twice, so the panel is not able to hide!

Deleting this code allows to hide the panel properly after the button click

Stem  Jun 11, 2012 
PDF Page 218
Point 8

On page 218 point 8:

CHANGE
Floorplan.jpg
IN
Set its ImageUrl property to point to the Floorplan.jpg file
TO
Floorplan.png

Per Hygum Due  Feb 25, 2012 
Printed Page 234
VB Sample code

RangeValidatorSalesDate.MinimumValue = "1900"()

should read

RangeValidatorSalesDate.MinimumValue = "1900"

Bret McGee  Dec 05, 2012 
Printed Page 234
VB and C# code

Disregard my last errata post for this page as it is incomplete. The "1900" value throws an error.

This should be a complete date. However the example does not do what the paragraph suggests it should do - 1900 does not represent the "current" year.

The C# code should look something like:

RangeValidatorSalesDate.MinimumValue = new DateTime(DateTime.Now.Year, 1, 1).ToShortDateString();

RangeValidatorSalesDate.MaximumValue = new DateTime(DateTime.Now.Year, 12, 31).ToShortDateString();

This would give the range of the whole current year.

VB code would need same sort of fix

Bret McGee  Dec 05, 2012 
Printed Page 236
4th paragraph

"ClientFunctionName property of the CustomValidator control" should say "ClientValidationFunction property of the CustomValidator control" .

Grant King  May 27, 2012 
Printed Page 237-238, 240
Sample of Validate Client-Side Validator, Sample of C# code

The for loop in code samples has a logic error:
if (uc && lc && num) {
arguments.IsValid = true;

Carter Mitchell  Nov 12, 2012 
Printed Page 237-238, 240
Sample of Validate Client-Side Validator, Sample of C# code

The sample code has a logic error:
/// pp. 237-238
if (uc && lc && num) {
arguments.IsValid = true;
break;
}
/// p. 240
if (uc && lc && num)
{
// must be valid
args.IsValid = true;
break;
}
If the first three or more characters satisfy the conditions, the loop will exit, regardless of any remaining characters. To handle the validation correctly, a fourth "else" clause is needed, and the "break;" statement moved there. Thusly:

else {
arguments.IsValid = false;
break; // the loop will exit on the first invalid character with condition of false
}

if (uc && lc && num) {
arguments.IsValid = true;
} // the loop will continue until the end of the string

Carter Mitchell  Nov 12, 2012 
Printed Page 237
Javascript code

The statement "var data = arguments.Value.split(' ');" creates an array called "data" with the value of the entered password string split into substrings, if there are any blanks in the password. Each substring is put in an element of the array. If there is no blank in the password, the whole password string is put in element "data[0]".

The problem is that the test of "data.length" further down in the code does not test the length of the first element of the array "data", but the number of elements in it. This means that if one enters a password such as "Mas123", which is valid in the example, "data" will contain only an element "data[0]" equal to "Mas123", and "data.length" will be equal to 1 (the number of elements), rather than 6 (the length of the password).

I used the following code instead, and it worked:

"var ArgArray = arguments.Value.split(' ')
var data = ArgArray[0]"

With this code, "data.length" is now correct for the subsequent code.

Daniel Metz  Aug 06, 2013 
Printed, PDF Page 238
Last paragraph

The last paragraph says "To implement server-side validation with the CustomValidator control, handle its ServerValidate event." However, nothing is said about setting the CustomValidator control's OnServerValidate property to define the name of the event handler in the code-behind file.

The OnServerValidate property should be included.

Grant King  May 27, 2012 
Printed Page 241
Part 7 of excercise

()

should read

(*)

Bret McGee  Dec 05, 2012 
Printed Page 251
2nd last paragraph

"Notice that the code sample catches a ThreadAbortException after calling System.Transfer. " should be changed to "Notice that the code sample catches a ThreadAbortException after calling Server.Transfer."

Use Server.Transfer instead of System.Transfer.

Grant King  May 27, 2012 
Printed Page 276
step 3

The ID's for the WebPartZone controls are of format TopWebPartZone, LeftWebPartZone, ... in the explaining text, but in the code sample ID's such as WebPartZoneTop and WebPartZoneLeft are used

Marcus Silfver  Apr 19, 2012 
Printed, PDF Page 279
Point 2

Two instances where ZoneTemplate is described as a control.

MSDN describes this as a property

Surely "tag" would be a better choice of words?

Bret McGee  Feb 28, 2013 
Printed, PDF Page 280
Code samples

VB

Dim browseModeName As String = webPartManager.BrowseDisplayMode.Name

C#
String browseModeName = WebPartManager.BrowseDisplayMode.Name;


These 2 lines seem to do absolutely nothing. browseModeName is not used; these lines could be removed I think


Also, generally messy code - nicely camelCase until _manager is declared.

Bret McGee  Feb 28, 2013 
PDF Page 283
Point 3

CHANGE TextBoxName
TO NameTextBox
IN
"user types in the TextBoxName control when he or she clicks Submit"

Per Hygum Due  Feb 28, 2012 
Printed, PDF Page 306
just above note

<%@ Page uiculture="es" culture="es-MX" %>

should read

<%@ Page UICulture="es" Culture="es-MX" %>

Bret McGee  Mar 01, 2013 
Printed Page 343
In the code part

I can't make the example work if Address in the templated user control is not initialized first.

I could make it work ok when I did in the code page 343

//I added this to initialise.... before setting up the container
this.Address = new Adress();

AddressUcContainer container = new AddressUcContainer (this.Address);

If we don't do that,
We get a mistake with NullReference exception when we use the control in the init event of the page using this control:

// Boom!!! Address is set to null...
AddressUcTemplated1.Address.AdddressLine1

nicolasclaudia  Dec 07, 2012 
Printed Page 405
view trace data

the url of trace page

http//server/application/trace.axd give me a 404 error

the url of the trace can be find editing the url in browser with trace.axd

(u can see it in fig. 8-10)

claudio m u milano  Mar 29, 2012 
Printed Page 410
Bottom of page

'If you set the TextArea control?s ID to TraceConsole. this tells the Microsoft AJAX Library'
should be
'Set the TextArea control?s ID to TraceConsole. This tells the Microsoft AJAX Library'

Tonino F.  Mar 23, 2012 
Printed Page 424
title

i think the title should be "publishing web application" and not "publishinf website"

claudio m u milano  Mar 30, 2012 
Printed Page 460
5th paragraph

Paragraphs suggests ChildrenAsTriggers="True" will cause nested UpdatePanel contols to update their parent.

this is not correct, see MSDN

Quote:
Set the ChildrenAsTriggers property to true if you want postbacks from immediate child controls of the UpdatePanel control to cause an update of the panel's content. Child controls of nested UpdatePanel controls will not cause an update of the parent UpdatePanel control's content unless you call the Update method explicitly or you define the child controls as triggers.
End Quote

Bret McGee  Jun 13, 2013 
Printed Page 476-477
Sample Code

In the sample code, the "innerText" property should be replaced by the "innerHTML" property make it work in other browsers (like Firefox).

Also, the text

@"var passLen = document.forms[0].MainContent_
TextBoxPassword.value.length;");

should be split in another place (ie after a dot) because it generates a script error. It sais that it cannot find the "TextBoxPassword" control.

If you want to take into accout the passwords that have 6 to 9 characters, you should change the last if to
"else if (passLen >= 6) {"

Bogdan Pirau  Nov 06, 2012 
PDF Page 483
1st paragraph

indication for client callback example is to, finally, use an asp control (in this case a dropdownlist) and make the server function call through the OnChange event, thus initiating the callback procedure. Problem is that .NET balks because the function listed is a function that the server will eventually place on the page in the PageLoad event of the code behind. But, because the function does not readily exist on the page yet, attempts at compilation fail.

<asp:DropDownList ID="DropDownListChoice" runat="server"
OnChange="MyServerCall(DropDownListChoice.value)">
<asp:ListItem>Choice 1</asp:ListItem>
<asp:ListItem>Choice 2</asp:ListItem>
<asp:ListItem>Choice 3</asp:ListItem>
</asp:DropDownList>

Error:


Line 16: <form id="form1" runat="server">
Line 17: <div>
Line 18: <asp:DropDownList ID="DropDownListChoice" runat="server" OnSelectedIndexChanged="MyServerCall(DropDownListChoice.value)">
Line 19: <asp:ListItem>Choice 1</asp:ListItem>
Line 20: <asp:ListItem>Choice 2</asp:ListItem>


Compiler Error Message: CS1061: 'ASP.webform1_aspx' does not contain a definition for 'MyServerCall' and no extension method 'MyServerCall' accepting a first argument of type 'ASP.webform1_aspx' could be found (are you missing a using directive or an assembly reference?)




Jean Gelinas  Dec 18, 2012 
Printed Page 489
Javascript code

The comparison of the two string objects in the AllowPasswordChange javascritpt method is not valid.

The comparison is made on the objects and not on their value.
The two String objects (pass1 and pass2) have different reference addresses. Thus, the comparison "pass1 == pass2" will always be false, even when the two object contain the same value.

The "if " statement should be:
if (pass1.valueOf() == pass2.valueOf())
or
if (pass1.toString() == pass2.toString())

Bogdan Pirau  Nov 07, 2012 
Printed Page 525
Table 9-2

The "first-child" and "nth-child" selectors' descriptions are wrong.

The $("div:first-child") description from the book is:
"Used to select the all first child elements inside <div> tags
on the page. Similar syntax can be used with last-child."
The description should be:
"Used to select div elements that are the first child of their parent elements."
See http://api.jquery.com/first-child-selector/ .

The $("#div1:nth-child(4)") description from the book is:
"Used to select the fourth child element inside the tag whose
ID is div1."
The description should be:
"Used to select the element that is the fourth child of his parent and also has the ID equal to 'div1'."

Bogdan Pirau  Nov 07, 2012 
Printed Page 526
Code sample at the bottom

this.innerHTML = "Section " + index
should be
this.innerHTML += "Section " + index
as in the description above it says that the code appends a sequential section ID.

Tonino F.  Apr 08, 2012 
Printed Page 527
Table 9-3 - .add() function

In the 9.3 table, the description for the .add() function reads:

"$("h2").add("span").css("color", "green");"
"The .add() function allows you to add things to found items.
This code finds all <h2/> elements and adds a <span/> tag with the cascading style sheet color style set to green.
You can use the .add() function to add selected elements, HTML fragments, another element, and more."


The .add() function does something else. It concatenates the elements that it matches with the result set of the previous selector.
In the provided example, the result set will contain all the "h2" elements and all the "span" elements from the page.

The .css() function does something else too. It applies the css property/value pair to all the items matched by the provided selectors. Thus, all the "h2" and span elements will be colored in green.

Bogdan Pirau  Nov 08, 2012 
Printed Page 532
Table 9-5 - .focusin(), .focusout()

The .focusin() and .focusout() descriptions are wrong. The book reads;

"The .focusin() event will be triggered for child elements when a parent element receives focus. The .focusout() event triggers when focus is lost by an element or its parent."

The jquery definitions for this events are:
- "The focusin event is sent to an element when it, or any other element inside it gains focus."
- "The focusout event is sent to an element when it, or any element inside of it, loses focus. "

Thus you can register to a paragraph's focusin/focusout event and receive the notification when an input inside it gains/loses the focus.

See the examples:
- http://api.jquery.com/focusin/
- http://api.jquery.com/focusout/


Bogdan Pirau  Nov 08, 2012 
Printed Page 533
Table 9-5 - .hover(), .select()

For the ".hover()" description, the book reads:
"Bind to this event to execute code when the mouse pointer is within the context of a specified element."

The .hover() method binds two handlers for the selected elements: a handler for the mouseover event and one for the mouseleave event. Thus, you can execute code when the mouse pointer is within the context of a spefied element and when the mouse pointer leaves that element.
http://api.jquery.com/hover/

For the ".select()" method, the book reads:
"This event is triggered when a user selects data or other
child elements contained within a parent element."

The .select() method binds to the select event, which is fired when the user selects text inside the specified element(s).
http://api.jquery.com/select/

Bogdan Pirau  Nov 09, 2012 
Printed Page 537
Sample of Visual Basic Code in the middle of the page

Public Function GetEmployee(ByVal employeeId As String) As String
should be
Public Shared Function GetEmployee(employeeId As String) As String
otherwise the function is not found. The C# Code is correct.

Tonino F.  Apr 08, 2012 
Printed Page 541
All Visual Basic code samples

In Visual Basic code samples the 'ByVal' could be omitted in the functions signatures. This would make the code samples easier to read.

For example
Public Sub New (ByVal empId As String)
could be changed to
Public Sub New (empId As String)

Tonino F.  Mar 18, 2012 
Printed Page 543
last box

errata of errata corrige, it end with

})});

claudio m u milano  Apr 06, 2012 
Printed Page 543
last box

errata of errata corrige, it end with

})});

claudio m u milano  Apr 06, 2012 
PDF Page 564
3rd paragraph

Note that this code uses the .click() method to define a binding to the validateEmpId
JavaScript function. The .click() method is a shortcut. You could also call .bind("click",
"validateEmpId").


Modifying the code to NOT use the .click() shortcut method will result in a javascript error. In IE9, the error is as follows: Microsoft JScript runtime error: Unable to get value of the property 'guid': object is null or undefined:

The "validateEmpId" should not be in quotes.

working jquery call:
$("#MainContent_ButtonSearch").bind("click", validateEmpId );

Note from the Author or Editor:
Need more info. Sent email.

Vinny Davi  Dec 22, 2011 
572
Step 8 code

Some browsers return an error with these lines of code...
Else
Response.Write("File not found")
End If

Due to the earlier line...
context.Response.ContentType = "image/jpeg".

Simple workaround is to do the following...
Else
context.Response.ContentType = "text/html"
Response.Write("File not found")
End If

The C# code may benefit from a similar change.

Steven Webb  May 19, 2012 
Printed Page 579
2nd paragraph in the WebMethodAttribute Class

In the 2nd paragraph for the WebMethodAttribute Class it says :
"You can assign the WebMethod attribute to a class..."

It should say :
"You can assign the WebMethod attribute to a method"

Talha Sayed  Feb 12, 2013 
Printed, PDF Page 590
Bullet point 5

Last sentence of point 5 states:

"Set the authorId parameter to contained in the auId query string value."

This is nonsensical, I presume it should be something like

"Set the authorId parameter to be contained in the query string value."

Richard Brown  Jun 11, 2012 
Printed Page 612
Step 5.

In step 5, it reads "Open IShipperService.vb (or IShipperService.cs)"

It should read, "Open ShipperService.vb (or ShipperService.cs)"

Step 7 describes adding code to the IShipperService.vb / IShipperService.cs files.

John Grace  Aug 31, 2012 
Printed Page 624
Real World section

It says -

"This means that I've witnessed the evolution of DBO to ADO to ADO.NET and beyond."

Shouldn't it be DAO instead of DBO?

SP  Jul 27, 2012 
Printed Page 647
Q1 Answer D

Dictionary<TKey, TValue)

should read

Dictionary<TKey, TValue>

Bret McGee  May 19, 2013 
Printed Page 696
VB/C# Sample code

The C# GetPagedCustomersSorted method doesn't consider the case of a descendin sorting.
In this case, the sortCol parameter might have a value similar to '"CompanyName DESC" and the Linq query will fail and will throw an ArgumentException.

The Linq query from the book is:

var dsSort = from cust in ds.Tables["customers"].AsEnumerable()
orderby cust.Field<string>(sortCol)
select cust;

It should be replaced with:

bool desc = sortCol.EndsWith(" DESC", StringComparison.InvariantCultureIgnoreCase);
OrderedEnumerableRowCollection<DataRow> dsSort = null;

if (desc)
{
sortCol = sortCol.Substring(0, sortCol.Length - 5);
dsSort = from cust in ds.Tables["customers"].AsEnumerable()
orderby cust.Field<string>(sortCol) descending
select cust;
}
else
{
dsSort = from cust in ds.Tables["customers"].AsEnumerable()
orderby cust.Field<string>(sortCol) ascending
select cust;
}

Similar changes should be made for the VB code.

Bogdan Pirau  Nov 14, 2012 
Printed Page 696/697
ObjectDataSource example page 696/GridView example page 697

The default page size value for the GridView is 10. If you set it to another value, the grid view will still display 10 items until you set the "SelectCountMethod" of the ObjectDataSource.

If you set the SelectCountMethod to a method that returns the number of customers, the GridView will know how to make the pagination and it will display the pager control.


You should consider adding the SelectCountMethod to the ObjectDataSource from the bottom of the page 696, to enable paging in the grid view.

You should also consider changing the PageSize for the GridView example from page 697 to another value, different from the default PageSize value (10).

You should also consider changing the second paragraph on page 697 and take into account the SelectCountMethod because you don't have to implement custom paging if you specify it. You only need to reset the PageIndex of a GridView when you change its PageSize. If the new PageSize is bigger than the previous value the current PageIndex might be bigger than the new page count, resulting in an exception.

Bogdan Pirau  Nov 14, 2012 
PDF Page 702

In the note.

CHANGE: These can be identified by the .mdf file extension
TO: These can be identified by the .mdb file extension

Per Hygum Due  Mar 20, 2012 
Printed Page 704
Second example

The CommandText property of the second EntityDataSource example contains a '>' character.
It should be replaced by '&gt;' in order for the code to be built.

Change;
<asp:EntityDataSource ID="EntityDataSource1" runat="server"
ConnectionString="name=NorthwndEntities"
DefaultContainerName="NorthwndEntities"
CommandText =
"Select o.OrderId as Id, o.UnitPrice, o.Quantity,
o.UnitPrice * o.Quantity as LineItemTotal
from OrderDetails as o
where o.Discount > 0
order by o.ProductId">
</asp:EntityDataSource>

to:
<asp:EntityDataSource ID="EntityDataSource1" runat="server"
ConnectionString="name=NorthwndEntities"
DefaultContainerName="NorthwndEntities"
CommandText =
"Select o.OrderId as Id, o.UnitPrice, o.Quantity,
o.UnitPrice * o.Quantity as LineItemTotal
from OrderDetails as o
where o.Discount &gt; 0
order by o.ProductId">
</asp:EntityDataSource>

Bogdan Pirau  Nov 14, 2012 
Printed Page 705, 706
EntityDataSource examples, where clauses

The character '>' should not be used in the declarative clauses of the EntityDataSource control.

On page 705, the Where clause is set to:
Where="it.Discount > 0"
It should be:
Where="it.Discount &gt; 0".

On page 706, the Where clause is set to:
Where="(it.Quantity * it.UnitPrice) > @OrderValue"
It should be:
Where="(it.Quantity * it.UnitPrice) &gt; @OrderValue"

Bogdan Pirau  Nov 14, 2012 
PDF Page 748
Point 4

CHANGE
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
TO
<asp:SqlDataSource ID="SqlDataSourceReadList" runat="server"

Per Hygum Due  Mar 21, 2012 
PDF Page 802
point 14

The text says
"14. Notice that the first time you run the application, it takes a little time, as ASP.NET generates the ASPNETDB.mdf
file for your site."
This is not true at all
even if you run Visual studio 2010 as administrator or/and give a connectionstring in web.config as
"
<connectionStrings>
<add name="ApplicationServices"
connectionString="data source=.\SQLExpress;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\aspnetdb.mdf;User Instance=true"
providerName="System.Data.SqlClient" />
</connectionStrings>
"
The aspnetdb file is not created, an update to this exercise would be very helpful

Jerker Pihl  Apr 11, 2013 
Printed Page 836
Both Code Samples

The function name should be changed in both code samples from Details() to Detail() to match the action ('Detail') in the URL.

Further down in the text
controller action method (Details)
should read
controller action method (Detail)

Tonino F.  Apr 14, 2012 
Printed Page 840
Last sentence on the page

action method (Index.aspx)
should be
action method (Index)

Tonino F.  Apr 14, 2012 
Printed Page 857
Code in c#

System.Web.Mvc.ViewPage<dynamic> should be:
System.Web.Mvc.ViewPage

nicolasclaudia  Feb 07, 2013 
PDF Page 858
just before the table

"This instance contains many action methods" should say instead "This instance contains many helper methods"

nicolasclaudia  Feb 08, 2013 
Printed Page 866
Code in MainContent

Html.Action ?

no - user controls rendered by

Html.RenderPartial

surely?

Bret McGee  Jun 15, 2013 
Printed Page 870
Sample of Visual Basic Code

'Sample of Visual Basic Code' and 'Sample of C# Code' don't correspond, as in the Visual Basic Code there is no namespace.
I think the namespace should be omitted in both code samples.

Tonino F.  Mar 18, 2012 
PDF Page 870
Point 8

CHANGE "Assign the MetedataType attribute to"
TO "Assign the MetadataType attribute to"

Per Hygum Due  Mar 25, 2012 
Printed Page 874
HttpPost version of the Edit Action

return View("Edit", emp.EmployeeID);

should read

return View("Edit", emp);

...because the view is expecting an Employee not an int.

Bret McGee  May 11, 2013 
PDF Page 887
Answer D to 4th question


It says that user input won't be available. That's not true. Strictly speaking. I.e. Also considering that input of dynamically added controls is not available by referring to their IDs like the static ones anyway & that you have to use FindControl method of the container control.

Bhavesh  Mar 31, 2012 
Printed Page 907
Lesson 3

Header for question 1 says answers B & D are correct, however the discussion for answer D then says Incorrect. D should be marked as Correct.

PhilPursglove  Mar 26, 2012 
PDF Page 912
Bottom paragraph

The book constantly states that Linq queries work with IEnumerable but they work with IEnumerable<T>! So against a dataset i cannot use linq. Against a DataSet<T> i can

martijn muurman  Dec 10, 2012