Skip to main content

Professional ASP.NET 1.0, Special Edition

Professional ASP.NET 1.0, Special Edition

Richard Anderson, Brian Francis, Alex Homer, Rob Howard, Dave Sussman, Karli Watson

ISBN: 978-0-764-55861-0

Aug 2004

1392 pages

Select type: E-Book

$38.99

Product not available for purchase

Description

What is this book about?

This comprehensive compendium provides a broad and thorough investigation of all aspects of programming with ASP.NET. Entirely revised and updated for the 1.0 Release of .NET, this book will give you the information you need to master ASP.NET and build dynamic, successful, enterprise Web applications.

What does this book cover?

Here are just a few of the topics covered in this book:

  • What ASP.NET is, and how it makes building applications even easier
  • How easy it is to work with ASP.NET pages and server-side controls
  • Accessing data of all kinds in your ASP.NET pages
  • An introduction to ADO.NET
  • Getting started with ASP.NET and the .NET Framework
  • Creating ASP.NET pages, working with server controls, and data management
  • Developing, securing, and configuring web applications
  • Exploring Base class libraries, components, and extensibility
  • Working with Web Services and ASP.NET in the mobile arena
  • Debugging, performance, migration, and interoperability
  • Integrating this knowledge in real world development contexts

Who is this book for?

This book is aimed at experienced ASP developers working at the leading edge — rather than the casual ASP developer or beginner. We do not cover the basics of COM, ASP, or the .NET programming languages. This book is also ideal for Visual Basic developers who want to move into Web application design.

What do you need to use this book?

Here's what you need to know in order to use this book:

  • A solid understanding of ASP
  • Familiarity with VB or C-based syntax (C++, Java(TM), or C#)
  • A desire to develop sophisticated ASP.NET applications using the .NET Framework
  • A desire for a comprehensive and in-depth guide to this exciting new technology
Introduction.

Chapter 1: A Fast Track Guide to ASP.NET.

Chapter 2: Understanding the .NET Framework.

Chapter 3: The .NET Languages.

Chapter 4: Writing ASP.NET Pages.

Chapter 5: Server Controls and Validation.

Chapter 6: ASP.NET Web Form Controls.

Chapter 7: List Controls and Data Binding.

Chapter 8: Introducing .NET Data Management.

Chapter 9: Working with Relational Data.

Chapter 10: Updating Relational Data Sources.

Chapter 11: XML Data Management in .NET.

Chapter 12: Web Applications and global.asax.

Chapter 13: Configuration.

Chapter 14: Securing ASP.NET Applications.

Chapter 15: Working with Collections and Lists.

Chapter 16: Working with Other Base Classes.

Chapter 17:.NET Components.

Chapter 18: Building ASP.NET Server Controls.

Chapter 19: Exposing Web Services.

Chapter 20: Using Web Services.

Chapter 21: Mobile Controls.

Chapter 22: Tracing, Error Handling, Debugging, and Performance.

Chapter 23: Migration and Interoperability.

Chapter 24: Case Study – IBuyAdventure.NET.

Appendix A: The Common System Namespaces.

Appendix B: Scott Guthrie’s Top Performance Tips.

Appendix C: References and Further Information.

Index.

Download all code samples for this book - C# version
Download
Download all code samples for this book - VB.NET version
Download
Download upgrade pack for the First Edition of this book
Download
ChapterPageDetailsDatePrint Run
124Error in Code

In the block, runat="Server" appears twice. It is, of course, only required once.

24-Jun-021

390Repeated Double Quotes in Code

In the final code sample on the page, the double quotes have been repeated in error. The code should be:

Sub New()
  _firstName = "
  _lastName = "
End Sub
24-Jul-021

391Repeated Double Quotes in Code

In the second and third code blocks on the page, the double quotes have been repeated in error. The code should be:

coolDude.FirstName = "Vince"
coolDude.LastName = "Patel"

Dim coolDude as New Person("Vince","Patel")
24-Jul-021

394Repeated Double Quotes in Code

In the second code sample on the page, the double quotes have been repeated in error. The code should be:

Public Function FullName() As String Implements IPerson.FullName
  Return _firstName & " " & _lastName
End Function
24-Jul-021

395Repeated Double Quotes in Code

In the second and third code sample on the page, the double quotes have been repeated in error. The code should be:

Dim ConnectionTimes() As Date = {"10:30", "11:30", "12:00", "06:00"}

name &= " Sussman"
24-Jul-021

398Try should be Catch

The second sentence of the first paragraph reads: "You should put the most specific Try blocks first, and ..." but should read "You should put the most specific Catch blocks first, and ..."

22-Jul-021

4144Layout of HTML Tags

The locations and ordering of the HTML tags in the code example spanning pages 144 and 145 is incorrect. The layout should be as follows (ASP.NET code omitted for brevity):

<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.SqlClient" %>

<script language="VB" runat="server">

   ...

</script>

<html>

<head>
</head>

<body>

   <form runat="server">

      ...

   </form>

</body>

</html>
29-Nov-021

4161Missing Closing Bracket

In the first code block (and second block on Page 62) there is a missing closing bracket. The code should appear as:

If Len(Request.Params("ProductCode")) > 0 Then
24-Jun-021

4166Code Correction - Single Quotes

A correction is required to the ASP:Button code within the ItemTemplate element. The contents of the Text attribute should be within single quotes due to the fact its contents contain double quotes.

<asp:button id="button" Text='<%# DataBinder.Eval( Container.DataItem, "Initials" ) %>' runat="server" />
01-Jul-021

4192Incorrect time quoted in text

In the second paragraph the text in parenthesis should read (it's now 15:49:14) so that it matches the screenshot below it.

25-Sep-021

6247Event Properties Correction

In the table, the Event Properties for CheckBox and RadioButton should be OnCheckedChanged.

24-Jun-021

6281Incorrect Screenshot

Unfortunately the screenshot was re-taken just before printing, and the wrong value used in the DataTextFormatString textbox. It should be "Bid: {0:C}" not "Bid: [0:C]". This error was corrected in the April 2002 reprint.

24-Jun-021

7313value attribute

The last line of the last but one paragraph should read "...doesn't set the value attribute of each one".

11-Feb-031

8390New Set-up Routine

After publication, an automated set-up routine was added to the downloadable samples. The file connect-strings.ascx is different in this download, and does not need to be edited to specify the connection strings. Instead, they are specified in the appSettings section of the web.config file in the root folder of the samples. The set-up routine expects to find an instance of MSDE named .NetSDK (as provided with the .NET SDK). You can edit the connection strings in the appSettings section of web.config to specify a different database server or MSDE instance if required.

13-May-021

8395SingleResult bullet point

In the SingleResult bullet point, the second sentance should read "Alternatively, use the ExecuteScalar method of the Command Object".

31-Jul-021

11549InferXMLSchema

Uses a schema that is referenced by a TextReader...

Should read:

Takes an XML document provided in a TextReader.... This error was corrected in the April 2002 reprint.

24-Jun-021

11571Method Name Correction

In the first code block, the method used on the objXTReader object should be ReadString():

objXTReader.ReadString()
24-Jun-021

12602Class1.vb Code

In the second code block, two lines are in the wrong order. "MyConnection = ..." must appear before "MyCommand = ...". This was corrected in the April 2002 reprint.

24-Jun-021

12614Incorrect Namespace name

The first line of the Cache Overview section should read: Cache is an instance of the Cache class found in the namespace System.Web.Caching.

24-Jun-021

13698The following passage should be included on this page

Note, an important but subtle change in the final released version of ASP.NET is the Windows identity that the ASP.NET worker process runs as. In previous beta versions it was the ???System??? account. The final version uses a special Windows account created when the .NET Framework is installed: aspnet. For more details on the implications of these changes please see the chapter on security. This of course is still configurable using the username/password attributes of the settings. This error was corrected in the April 2002 reprint.

24-Jun-021

13699userName change

userName="SYSTEM"

should be:

userName="machine" This error was corrected in the April 2002 reprint.

24-Jun-021

13700userName and password change

userName="SYSTEM"

should be:

userName="machine" This error was corrected in the April 2002 reprint.

24-Jun-021

13700userName and password change

userName="
password="

should be:

userName="machine"
password="autogenerate" This error was corrected in the April 2002 reprint.

24-Jun-021

13703userName and password change

userName="
password="

should be:

userName="machine"
password="autogenerate" This error was corrected in the April 2002 reprint.

24-Jun-021

13705Setting the Identity of the Process

'By default it is the System account'

should read:

'By default, it is a restricted Windows account called ASPNET.'

Also:

'by using these settings we can instruct the process to execute under another Windows identity.'

should read:

'by using these settings we can instruct the process to execute under another Windows identity, or the System account.' This error was corrected in the April 2002 reprint

24-Jun-021

13706Identity change

In top paragraph of the page: 'we see that the process is executing as user ASPNET_WP rather than SYSTEM.' should read: 'we see that the process is executing as user ASPNET_WP rather than aspnet.' This error was corrected in the April 2002 reprint.

24-Jun-021

13706Missing username/password info

The following note should be included immediately before the 'Logging Process Events': To run as the system account, as previous Beta versions of ASP.NET did, we simply change the username/password to the following values: userName="System" password="AutoGenerate" This error was corrected in the April 2002 reprint.

24-Jun-021

14730Impersonation

In the second set of bullets, first two should be replaced by this one bullet: "The request is made under the context of the special ASPNET process account, irrespective of whether anonymous access is enabled or not in IIS" ...[when impersonation is not enabled].

13-May-021

15784IEnumerator should read IEnumerable

last paragraph: in the sentence "All arrays implement the IEnumerator interface..." replace IEnumerator with IEnumerable.

24-Jun-021

15807HashTable Object behaviour

The default behaviour of the HashTable object has changed from Beta 2, and it will now throw an exception if the Key object is considered to match an existing Key object that is in use for an existing item in a HashTable. However, the remainder of the text concerning the behavior of the HashTable object is correct.

13-May-021

15820Second bit array

last paragraph before code section: should read "...setting bits 0, 1 and 6..."

13-May-021

15827Missing continuation character

The top code listing on page 827 is missing the continuation character "_" at the end of the first line of the GetEnumerator() method. The code should be:

Public Function GetEnumerator() As IEnumerator _
    Implements IEnumerable.GetEnumerator

  GetEnumerator = _products.Values.GetEnumerator()
End Function
27-Nov-021

221198Incorrect Screenshot

The wrong screenshot was included at the foot of the page (Note: this has been corrected in reprints from April 2002).

24-Jun-021

231251Corrected code

The C# code at the bottom of the page should be:

[StructLayout(LayoutKind.Sequential)]
  public class SystemTime
  {
    public short wYear;
    public short wMonth;
    public short wDayOfWeek;
    public short wDay;
    public short wHour;
    public short wMinute;
    public short wSecond;
    public short wMilliseconds;
  }

  public class API
  {
    [DllImport("Kernel32.dll")]
    public static extern void GetSystemTime(
      [Out, MarshalAs(UnmanagedType.LPStruct)]
      SystemTime sysTime);
  }
24-Jun-021

231252Corrected Code

The first code section should be:

SystemTime st = new SystemTime();
  API.GetSystemTime(st);
  Response.Write("Month = " + st.wMonth);
13-May-021