MORE INFORMATION
CD-ROM: Test Engine Uninstall Disables Visual Studio .NET Functionality
An error has been discovered that occurs when you uninstall the
developing Web/Win apps test engine. You are left unable to open a new project
in Visual Studio, with an error that Automation Server Can't Create
Object.
The workaround is to re-register the
windows/system32/scrrun.dll file with the following steps:
- Open the command prompt.
- Change directory to windows\system32: Type
cd\windows\system32 and press enter.
- Verify that the scrrun.dll file is in the system32
directory: Type dir scrrun* and press enter. The file name should be
displayed.
- You now need to register scrrun.dll: Type regsvr32
scrrun.dll and press enter. You should get a message that the registration was
successful.
You should now be able to open a new project in Visual
Studio.
Page xxix: Change To Command Line Path
On page xxix, in step 3 of setting up the lesson files, the
command line sample should be changed from the D: drive to the C: drive to
match the previous steps.
Change:
"D:\MCSDWebApps>
makeVirtualDirectories D:\MCSDWebApps"
To:
"C:\MCSDWebApps>
makeVirtualDirectories C:\MCSDWebApps"
Page 13: Common Should Be Component
On page 13, in the last sentence of the first
paragraph,
Change:
"Common Object Model
(COM)"
To:
"Component Object Model (COM)"
Page 51: Localhost Should Be Default Web Site
On page 51, in step 1,
Change:
"1. Right-click the
localhost icon in IIS and ..."
To:
"1. Right-click the Default
Web Site icon in IIS and ..."
Page 56: Correction To Table 2-1
On page 56, in Table 2-1,
Change:
AssmblyInfo.
AssemblyInfo.csvb
To:
AssmblyInfo.vb AssemblyInfo.cs
Pages 62 & 63: Error In Code Samples
On page 62, in the Visual Basic .Net code sample line 9, change:
' Display Session count.
To:
' Display Application count.
and in the Visual C# code sample, first line on page 63,
change:
// Display Session count.
To:
// Display Application count.
Page 74: Incorrect Tip On Control Array Creation
In the Tip box on page 74, it is incorrectly stated that "In Web forms, this does not create a control array as it does in Windows forms." This sentence should be removed as it applies to VB 6.0, not VB.NET.
In Visual Basic .NET, control arrays are no longer supported. Changes to the event model make control arrays unnecessary. Just as control arrays in Visual Basic 6.0 could share events, the event model in Visual Basic .NET allows any event handler to handle events from multiple controls. In effect, this allows you to create groups of controls of disparate types that share the same events.
More details on this can be found on the Microsoft Developer Network at
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vbconcontrolarraychangesinvisualbasicnet.aspPage 78: Incorrect Code Module Name
On page 78, in step 1 of exercise 4, you are instructed to open
the Web form's code module FlashCard.aspx.vb. This is only correct for the
Visual Basic version of the code.
Change:
"FlashCard.aspx.vb"
To:
"FlashCard.aspx"
Page 78: Incorrect Declaration
On page 78, in step 2, the Visual Basic declaration needs to be
changed from:
Dim FlashCard As FlashCardClass
To:
Dim FlashCard As New FlashCardClass
Page 79: Step 4 Needs Additional Instructions
On page 79, step 4, add the following as the first sentence to
the instruction:
"In the project window, double-click the
FlashCard.aspx file and then double click the textbox."
Page 91: Four Should Be Five
On page 91, in the third paragraph,
Change:
"Visual Basic .NET and Visual C# use four key concepts..."
To:
"Visual Basic .NET and Visual C# use five key concepts..."
Page 101: Depth Should Be Front
On page 101, in the Visual Basic code sample, 13 lines from the
top of page, change:
Depth = sCenter - Radius
To:
Front = sCenter - Radius
Page 109: Duplicate Line And Missing Code
On page 109, in the Visual C# code sample, a line has been
duplicated (lines 12 and 13), and the correct line of code is missing for line
13.
Change:
ShowShapeInfo(MySphere);
ShowShapeInfo(MySphere);
To:
ShowShapeInfo(MySphere);
ShowShapeInfo(MyCircle);
Page 116: Extra Set Of Parenthesis In Visual C# Code Sample
On page 116, in the Visual C# code sample,
Change:
if ((Request.Cookies["UName"] != null))
To:
if (Request.Cookies["UName"] != null)
Page 119: Response Should Be Request
On page 119, under "Visual C#",
Change:
"To
retrieve a query string in code, use the QueryString method of the Response
object."
To:
"To retrieve a query string in code, use the
QueryString method of the Request object."
Page 124: Correction To sessionState
On the bottom of page 124, the sessionState tag is incorrect.
Change:
"<sessionstate mode="False">"
To:
"<sessionState mode="Off">"
Page 130: Translator Should Be TranslatorClass
On page 130, in the Visual C# code sample in Exercise 3,
change:
Translator TransClass = new TranslatorClass();
To:
TranslatorClass TransClass = new TranslatorClass();
Page 144: DropDown list Should Be DropDownList
On page 144, in the paragraph following the Visual C# sample code,
Change:
"Both the ListBox and DropDown list"
To:
"Both the ListBox and DropDownList"
Pages 145-146: Visual C# Code Sample Replacement
The Visual C# code sample on pages 145-146 needs to be replaced
with the following code:
private void butAdd_Click(object sender,
System.EventArgs e)
{
ListBox1.Items.Add(txtSource.Text);
DropDownList1.Items.Add(txtSource.Text);
// Add text to the page's ViewState.
ViewState.Add(ViewState.Count.ToString(), txtSource.Text);
RebuildTable();
}
private void RebuildTable()
{
string[] arrWords;
string strWords;
TableRow rowNew;
TableCell celNew;
// For each string saved in ViewState.
for (int iCount1 = 0; iCount1 < ViewState.Count;
iCount1++)
{
char[] strSep = {','};
// Create a new table row.
rowNew = new TableRow();
// Get the string from ViewState.
strWords = ViewState[iCount1.ToString()].ToString();
// Break the item list into an array.
arrWords = strWords.Split(strSep);
// For each item in the array.
for (int iCount2 = 0; iCount2 <= arrWords.GetUpperBound(0); iCount2++)
{
// Create a new table cell.
celNew = new TableCell();
// Set the text to display in the cell.
celNew.Text = arrWords[iCount2];
// Add the cell to the table row.
rowNew.Cells.Add(celNew);
}
// Add the row to the table.
Table1.Rows.Add(rowNew);
}
}
Page 198: New Should Be Save
On page 198, in step 5, the button name is erroneously named as New.
Change:
"...and double-click New to display the Code window."
To:
"...and double-click Save to display the Code window."
Page 207: SqlDbConnection Should Be SqlConnection
On page 207, in the second bulleted item,
Change:
"SqlDbConnection"
To:
"SqlConnection"
Page 209: Figure 5-2 Incorrect
On page 209, Figure 5-2 does not illustrate the correct dialog
box referred to in step 2 under "Connecting to a Database" on page 208. Please
disregard this figure.
Page 210: Correction To Step 5
On page 210, step 5 needs to be changed to read:
"As
shown in figure 5-3, enter (local)\NETSDK as the server name and use Windows NT
Integrated Security. Select "Attach a database file as a database name", and
enter Contacts in the first field and for the second field browse to the
Contacts.mdf file (it should be located at
C:\MCSDWebApps\Chapter05\Contacts.MDF). Click Test Connection to make sure your
settings are correct. Click Ok when the connection succeeds. Visual Studio adds
the data connection to the Server Explorer, as shown in figure 5-4."
Page 295: False Should Be True
On page 295, in the second bullet,
Change:
"To turn
tracing on for a single page, set the DOCUMENT object's Trace property to
False"
To:
"To turn tracing on for a single page, set the DOCUMENT
object's Trace property to True"
Microsoft Press is committed to providing informative and accurate
books. All comments and corrections listed above are ready for inclusion in
future printings of this book. If you have a later printing of this book, it
may already contain most or all of the above
corrections.