Essential ASP.NET with Examples in Visual Basic.NET

Paperback (Print)
Used and New from Other Sellers
Used and New from Other Sellers
from $1.99
Usually ships in 1-2 business days
(Save 96%)
Other sellers (Paperback)
  • All (20) from $1.99   
  • New (6) from $35.04   
  • Used (14) from $0.00   

Overview

"This well-conceived and well-written book has extensive knowledge and priceless experience overflowing from its pages. It captures the true essence of ASP.NET and walks the reader to a high level of technical and architectural skill."
--J. Fred Maples, Director of Software Engineering, NASDAQ.com

Essential ASP.NET with Examples in Visual Basic .NET is the Visual Basic programmer's definitive reference for ASP.NET through version 1.1. It provides experienced programmers with the information needed to fully understand the technology, and is a clear guide to using ASP.NET to build robust and well-architected Web applications.

This book begins with a discussion of the rationale behind the design of ASP.NET and an introduction to how it builds on top of the .NET framework. Subsequent chapters explore the host of new features in ASP.NET, including the server-side compilation model, code-behind classes, server-side controls, form validation, the data binding model, and custom control development. Throughout the book, working examples illustrate best practices for building Web-based applications in VB.NET.

Among the topics explored in depth are:

  • ASP.NET architecture
  • Web forms
  • Configuration
  • HTTP pipeline
  • Diagnostics and error handling
  • Validation
  • Data binding
  • Custom controls
  • Caching
  • State management
  • Security

Essential ASP.NET with Examples in Visual Basic .NET provides readers with the know-how needed to build more powerful, better architected Web applications with ASP.NET.

0201760398B12042002

Read More Show Less

Product Details

  • ISBN-13: 9780201760392
  • Publisher: Addison-Wesley
  • Publication date: 2/14/2003
  • Series: Microsoft .NET Development Series
  • Pages: 395
  • Sales rank: 1,313,486
  • Product dimensions: 7.40 (w) x 9.10 (h) x 0.90 (d)

Meet the Author

Fritz Onion is a member of the technical staff at DevelopMentor where he teaches courses in .NET and oversees the ASP.NET curriculum. He is a former columnist for C++ Report, and currently writes articles for various publications including MSDN Magazine. He speaks regularly at industry conferences and was the cochair of the Web development track at Win-Dev's Fall Developers Summit 2002. Fritz received his B.A. from Harvard University and his M.S. from the University of California, Irvine.

0201760398AB11072002

Read More Show Less

Table of Contents

Foreword.

Preface.

1. Architecture.

Fundamentals.

ASP 4.0.

Compilation versus Interpretation.

System.Web.UI.Page.

Code-Behind.

Event Handling.

Shadow Copying.

Directives.

The New Intrinsics.

2. Web Forms.

Server-Side Controls.

ViewState.

Events.

A Day in the Life of a Page.

Web Forms and Code-Behind.

Root Path Reference Syntax.

HtmlControls.

WebControls.

List Controls.

WebControls versus HtmlControls.

Building Web Forms with Visual Studio .NET.

3. Configuration.

web.config.

Configuration Hierarchy.

Location Element.

Element Placement.

Impact of Configuration Changes.

IIS and web.config.

Configuration Data.

Process Model.

Accessing Process Information.

IIS 6.0 Process Model Changes.

Additional Settings.

Reading Configuration Information.

Building a Custom Configuration Section Handler.

Using the NameValueFileSectionHandler.

4. HTTP Pipeline.

A Day in the Life of a Request.

Ten Thousand-Foot View of Request Processing.

Inside the Pipeline.

Context.

Applications.

Application Events.

Declarative Object Creation.

Custom Handlers.

Custom Handlers for File Processing.

.ashx.

Handler Pooling.

Custom Handler Factories.

Custom Modules.

Modules as Filters.

Module Pooling.

Modules versus global.asax.

Threading in the Pipeline.

Asynchronous Handlers.

5. Diagnostics and Error Handling.

Diagnostics in ASP.NET.

Page Tracing.

Writing Trace Messages.

Application-Level Tracing.

Performance Monitor Counters.

Debugging.

Error Handling.

Unhandled Exceptions.

6. Validation.

Form Validation.

Client-Side Validation.

Server-Side Validation.

Validation Observations.

Validation Control Architecture.

Page Validation.

Client-Side Validation.

Validation Controls.

7. Data Binding.

Fundamentals.

Data Binding Controls.

Binding to Database Sources.

IDataReader Binding.

DataSet Binding.

DataSet versus DataReader for Data Binding.

DataGrid.

DataGrid Paging.

DataGrid Sorting.

DataGrid Editing.

Templates.

Data Binding Evaluation Syntax.

DataBinder.

Templated Controls.

Repeater.

DataList.

8. Custom Controls.

Fundamentals.

Writing Custom Controls.

Using Custom Controls.

System.Web.UI.Control.

HtmlTextWriter.

Browser Independence.

Subproperties.

Inner Content.

Generating Client-Side Script.

System.Web.UI.WebControls.WebControl.

State Management.

ViewState.

Explicit Post-Back Data Handling.

Composite Controls.

Creating Child Controls.

Custom Events.

User Controls.

Validation and Data Binding.

Supporting Validation.

Data-Bound Controls.

Implementing a Data-Bound Control.

Designer Integration.

Properties and Appearance.

Type Converters.

Property Editors.

Designers.

9. Caching.

Caching Opportunities in ASP.NET.

Output Caching.

Output Caching Location.

Caching Multiple Versions of a Page.

Page Fragment Caching.

Output Caching Considerations and Guidelines.

Data Caching.

Cache Entry Attributes.

Cache Object Removal.

Data Cache Considerations and Guidelines.

10. State Management.

Types of State.

Application State.

Session State.

Session Key Management.

Storing Session State out of Process.

Cookie State.

View State.

11. Security.

Web Security.

Server Authentication.

Client Authentication.

Security in ASP.NET.

Client Authentication and Authorization.

Forms Authentication.

Authentication Cookies in Web Farms.

Optional Authentication.

Password Storage.

Salted Hashes.

Role-Based Authentication.

System Identity in ASP.NET.

Index. 0201760398T02042003

Read More Show Less

Preface

It was late at night in Torrance, California, in August 2000. I had spent 12 hours of the day teaching DevelopMentor’s Guerrilla COM course with Mike Woodring and Jason Whittington. Don Box had come over after class, and, as usual, we were staying up late into the night after the students had long since gone to bed, discussing technology and hacking. Microsoft had just released its preview version of .NET at the PDC in July, and we had been spending much of the year up to that point digging into “the next COM” and were excited that it had finally been released so we could talk about it. It was that evening that Don, in his typical succinct way, showed me my first glimpse of ASP.NET (then called ASP+). Perhaps it was the late hour or the fact that I had been teaching all day, but I have to admit that although I “got” the technical details of what Don was showing me, I was somewhat underwhelmed by being able to change the innerText of an h1 element from a class.

The following week, after a couple of good nights of sleep, I revisited the .aspx example and began to explore ASP.NET in more detail. After a day of reading and experimenting, I finally “got it” and I was hooked. This technology was poised to fundamentally change the way people built Web applications on Windows, and it took full advantage of the new .NET runtime. I spent the next six months researching, building ASP.NET applications, and writing DevelopMentor’s Essential ASP.NET course, and I spent the subsequent year and a half teaching, speaking, and writing about ASP.NET. This book is the culmination of those activities, and I hope it helps you in your path to understanding ASP.NET.

C# versus VB.NET

Before .NET, Visual Basic was not just another language—it was a platform unto itself. Building applications in Visual Basic 6.0, for example, was completely different from using C++ and MFC. With .NET, this distinction is gone, and Visual Basic is indeed just another .NET language that uses the same libraries, the same development tools, and the same runtime as all others. As a consequence, we can now talk about technologies like ASP.NET from a language-neutral standpoint. The code samples, however, must be shown in a particular language, so this book is published in two versions: one with examples in C# and one with examples in VB.NET. All content outside the examples is nearly identical between the two books.

Sample Code, Web Site, Feedback

All the code samples in this book are drawn from working samples available for display and download from the book’s Web site at http://www.de-velop.com/books/essentialasp.net. This site also contains any errata found after publication and a supplemental set of more extended examples of the concepts presented in this book for your reference. The author welcomes your comments, errata, and feedback via the forms available on the Web site.

Prerequisites

This book focuses exclusively on ASP.NET and does not spend time reviewing .NET programming, object-oriented programming techniques, database access, or general Web application development techniques. You will be able to get the most out of this book if you have spent some time gaining experience in each of these areas.

Organization of This Book

This book approaches ASP.NET from the ground up, beginning with a look at the core elements of the architecture in Chapter 1 and continuing with the server-side control model in Chapter 2. It is recommended that the reader be familiar with the contents of Chapters 1 and 2 before reading any of the subsequent chapters. However, all chapters after 2 can be read independently and in any desired sequence.

Chapter 1, Architecture, covers the fundamentals of the ASP.NET architecture, beginning with a look at the parsing of .aspx files and their subsequent compilation into assemblies. This chapter explains the details of the Page class, demonstrates the new code-behind model, and discusses the shadow copy mechanism used to prevent file locking. The chapter concludes with a look at the new classes in ASP.NET that replace the intrinsic objects of traditional ASP.

Chapter 2, Web Forms, looks at the control-based programming model supported in ASP.NET called Web Forms. This chapter looks at the details of state retention across post-backs using both POST body data and ViewState, and describes how to effectively use server-side controls to create dynamic Web pages. The chapter concludes with a look at the various server-side controls available in ASP.NET.

Chapter 3, Configuration, describes the configuration model used by ASP.NET, starting with the XML format used by all configuration files and the hierarchical application of configuration settings. This chapter inspects several configuration elements in detail, including the processModel and appSettings elements. The chapter concludes by demonstrating two techniques for adding custom configuration sections to your configuration files.

Chapter 4, HTTP Pipeline, explores the details of the classes involved with servicing HTTP requests in ASP.NET. This chapter first walks through all the elements in the HTTP pipeline used to process a request, and then discusses the three points of extensibility in the pipeline: custom application classes, custom handlers, and custom modules. The chapter concludes with a discussion of threading and object pooling in the pipeline.

Chapter 5, Diagnostics and Error Handling, covers the new diagnostic features of ASP.NET, including page and application tracing as well as the new performance monitor counters. This chapter also discusses techniques for debugging ASP.NET applications and exception handling. The chapter concludes with a look at how to define custom error pages for your applications.

Chapter 6, Validation, describes the new validation architecture built into ASP.NET. This chapter begins by looking at how validation is performed in Web applications in general and proceeds to show how ASP.NET’s validation architecture provides a general solution to the problem of validating user input. The chapter includes a detailed look at how both client-side and server-side validation work, as well as a look at all the available validation controls.

Chapter 7, Data Binding, explores the process of binding server-side data to controls in an ASP.NET page. This chapter starts by explaining how data binding works with several different data sources, including collection classes, DataReaders, and DataSets, and then looks at how to bind data to several controls, including the DataGrid class. The chapter concludes with a look at templates and how to use them effectively with the Repeater, DataList, and DataGrid classes.

Chapter 8, Custom Controls, covers the fundamentals of building your own custom controls for use in ASP.NET applications. This chapter explains how custom controls are built, how to use the HtmlTextWriter class to achieve some browser independence, how to further support browser-independent rendering, how to define properties and subproperties, how to extract the inner content of a control’s tag, how to generate client-side script, and how to manage control state. The chapter also covers the details of building composite controls, user controls, controls that support validation, and controls that support data binding. The chapter concludes with a look at how to integrate your controls with the Visual Studio .NET designer.

Chapter 9, Caching, looks at both output caching and data caching in ASP.NET. This chapter discusses the mechanism of output caching and how to precisely control which versions of a page are placed in the cache, as well as how to cache portions of a page using page fragment caching with user controls. The chapter explains how to use the new application-wide data cache and includes a discussion of considerations and guidelines to observe when caching data.

Chapter 10, State Management, discusses the various types of state in an ASP.NET Web application and how and when to use each type. This chapter begins with a look at application state and explains why it should typically be avoided in ASP.NET. It then looks at the improvements in session state, including out-of-process storage and cookieless key management, as well as techniques for optimizing your use of session state. The chapter concludes with a look at using cookies and view state as alternatives, or in addition, to session state.

Chapter 11, Security, describes the security features of ASP.NET and how to control client authentication and authorization in your applications. This chapter starts by reviewing the concepts of security for Web applications and then shows how to build and manage applications that need to authenticate clients using the forms authentication architecture provided by ASP.NET. The chapter also covers the management of authentication cookies in Web farms, safe password storage, building role-based authentication systems, and how to control the process identity used by ASP.NET.

Acknowledgments

I would first like to thank my wife, Susan, and my children, Zoë and Sam, who supported me without hesitation during the writing of this book. Thanks also to my parents, Pat and Dan Onion, for their support and direction.

Thanks to all my colleagues at DevelopMentor for the many discussions and constant feedback both for the course and for this book. In particular, thanks to Bob Beauchemin for his always timely and useful feedback; Keith Brown, for showing me how to salt my hashes and otherwise reinforcing my security chapter; Simon Horrell, for his detailed feedback; Dan Sullivan, for leaving no stone unturned; Ted Pattison, for commiserating on writing and for his always positive comments; Stu Halloway, for making my writing more concise; and Mike Woodring, for thinking through the threading implications of asynchronous handlers with me.

Thanks to my official reviewers, Justin Burtch, Amit Kalani, Daryl Richter, Martin Heller, and Matt Milner, all of whom provided invaluable feedback. Thanks to the members of the ASP.NET team at Microsoft for building such an interesting product and for fielding many questions. In particular, thanks to Rob Howard for his input on caching and to Erik Olson for explaining thread allocation and pooling in the pipeline. Thanks to Don Box for introducing me to ASP.NET and for getting my writing career started at C++ Report back in 1995.

Thanks to my editor, Stephane Thomas, for all her hard work, and to my copy editor, Debby English, who more than lives up to her last name. Much gratitude also to the more than 1,000 students who have taken the Essential ASP.NET course-your input has shaped the stories in this book more than anything else. Thanks in particular to the students at the Essential ASP.NET course offered in Washington, D.C., in October 2002 for helping choose the color of the book covers.

Fritz Onion
Wells, Maine
October 2002
http://staff.develop.com/onion/

0201760398P02042003

Read More Show Less

Customer Reviews

Average Rating 5
( 1 )
Rating Distribution

5 Star

(1)

4 Star

(0)

3 Star

(0)

2 Star

(0)

1 Star

(0)

Your Rating:

Your Name: Create a Pen Name or

Barnes & Noble.com Review Rules

Our reader reviews allow you to share your comments on titles you liked, or didn't, with others. By submitting an online review, you are representing to Barnes & Noble.com that all information contained in your review is original and accurate in all respects, and that the submission of such content by you and the posting of such content by Barnes & Noble.com does not and will not violate the rights of any third party. Please follow the rules below to help ensure that your review can be posted.

Reviews by Our Customers Under the Age of 13

We highly value and respect everyone's opinion concerning the titles we offer. However, we cannot allow persons under the age of 13 to have accounts at BN.com or to post customer reviews. Please see our Terms of Use for more details.

What to exclude from your review:

Please do not write about reviews, commentary, or information posted on the product page. If you see any errors in the information on the product page, please send us an email.

Reviews should not contain any of the following:

  • - HTML tags, profanity, obscenities, vulgarities, or comments that defame anyone
  • - Time-sensitive information such as tour dates, signings, lectures, etc.
  • - Single-word reviews. Other people will read your review to discover why you liked or didn't like the title. Be descriptive.
  • - Comments focusing on the author or that may ruin the ending for others
  • - Phone numbers, addresses, URLs
  • - Pricing and availability information or alternative ordering information
  • - Advertisements or commercial solicitation

Reminder:

  • - By submitting a review, you grant to Barnes & Noble.com and its sublicensees the royalty-free, perpetual, irrevocable right and license to use the review in accordance with the Barnes & Noble.com Terms of Use.
  • - Barnes & Noble.com reserves the right not to post any review -- particularly those that do not follow the terms and conditions of these Rules. Barnes & Noble.com also reserves the right to remove any review at any time without notice.
  • - See Terms of Use for other conditions and disclaimers.
Search for Products You'd Like to Recommend

Recommend other products that relate to your review. Just search for them below and share!

Create a Pen Name

Your Pen Name is your unique identity on BN.com. It will appear on the reviews you write and other website activities. Your Pen Name cannot be edited, changed or deleted once submitted.

 
Your Pen Name can be any combination of alphanumeric characters (plus - and _), and must be at least two characters long.

Continue Anonymously
Sort by: Showing 1 Customer Reviews
  • Anonymous

    Posted November 2, 2003

    THIS BOOK IS AWESOME!!

    There are so many books out about ASP.NET it can be a very difficult task to choose one. To me there seems to be two types of books. One is the example intensive (at times over laden) book. The other is the 'how it works' type of book. The market seems to be flooded with example intensive books, but appears light in the 'how it works' type. This book is a fantastic 'how it works' book. It has good examples but is not drowning in them. The book's strength is its explanations of ASP.NET core topics, and the little tips and tricks that readers will pick up along the way. This book is well written and flows nicely. Without a doubt it is an excellent book for beginners and intermediate levels, but I would bet that even advanced users would pick up tips and tricks from the book. Summary Chapter 1: Architecture This chapter explains the basic new architecture behind ASP.NET. Compilation vs. Interpretation, Code-behind, new Page architecture, Shadow Copying, Directives, and new Intrinsic Objects (HttpRequest, HttpResponse, etc) are a few of the topics covered. Chapter 2: Web Forms This chapter is all about Web Forms. ViewState, HtmlControls, WebControls, and Events are some of the items discussed. One section I liked the best was the 'Day in the life of a page'. It explained the step by step events that occur during a page's lifetime in a very clear and concise manner. Chapter 3: Configuration This is an excellent chapter that discusses the new XML based configuration in ASP.NET. Web.Config, Machine.Config, and configuration hierarchy are examined. processModel and other elements are also discussed. Chapter 4: HTTP Pipeline This chapter goes over the HTTP Pipeline, and all the actions that take place each time a requests comes in. It goes into great coverage of how that request is routed through the architecture. It also goes over Context, Applications, Custom Handlers, and a few other related topics. This is a great chapter. Chapter 5: Diagnostics and Error Handling This chapter shows us how to get out of the classic response.write method of debugging ASP apps by examining the new diagnostic and error handling capabilities of ASP.NET. Page Tracing, Application-level Tracing, Error Handling, and Unhandled Exceptions are all discussed. Chapter 6: Validation This is a chapter that explains form validation (client and server-side), validation control architecture, and the validation controls. Chapter 7: Data Binding This chapter starts by explaining the fundamentals of binding data to controls, and then goes into IDataReader Binding, DataSet Binding, and picking when to use a DataSet vs DataReader. The chapter ends by discussing templated controls (DataGrid, Repeater, and DataList). Chapter 8: Custom Controls This is the largest chapter of the book (69 pages). This chapter covers custom control fundamentals, state management consideration when designing custom controls, composite controls, and user controls. Designer integration with VS.Net as well as validation and data binding within custom controls is also covered. This is an excellent chapter. Chapter 9: Caching This chapter discusses the new caching opportunities that exist in ASP.NET. Output caching and how it works is discussed. The VaryByParam attribute is also examined, as well as page fragment caching. The chapter also covers data caching, and consideration and guidelines for using it. Chapter 10: State Management Application state, session state, cookie state, and view state are all covered in this chapter. I think this is a great chapter because it discusses the pros and cons of each type of state, which will help developers be able to determine which type of state management would be best for their specific situation. Good discussion, with great insights. Chapter 11: Security A short chapter on security ends the book. Server and client authentication start the chapter out, and then we go into A

    Was this review helpful? Yes  No   Report this review
Sort by: Showing 1 Customer Reviews

If you find inappropriate content, please report it to Barnes & Noble
Why is this product inappropriate?
Comments (optional)