| Title page | 1 |
|---|
| Copyright page | 2 |
|---|
| Table of contents | 4 |
|---|
| About the Author | 24 |
|---|
| About the Technical Reviewer | 25 |
|---|
| Acknowledgments | 26 |
|---|
| Introduction | 27 |
|---|
| About This Book | 27 |
| Who Should Read This Book | 28 |
| What You Need to Use This Book | 29 |
| Code Samples | 29 |
| Chapter Overview | 30 |
| Part 1: Introducing .NET | 30 |
| Part 2: Developing ASP.NET Applications | 30 |
| Part 3: Building Better Web Forms | 30 |
| Part 4: Working with Data | 30 |
| Part 5: Website Security | 31 |
| Part 6: Advanced ASP.NET | 31 |
| Feedback | 31 |
| PART 1 Introducing .NET | 32 |
|---|
| CHAPTER 1 The .NET Framework | 33 |
|---|
| The Evolution of Web Development | 33 |
| HTML and HTML Forms | 33 |
| Server-Side Programming | 36 |
| Client-Side Programming | 37 |
| The .NET Framework | 39 |
| VB, C#, and the .NET Languages | 41 |
| Intermediate Language | 41 |
| The Common Language Runtime | 43 |
| The .NET Class Library | 44 |
| Visual Studio | 45 |
| The Last Word | 46 |
| CHAPTER 2 The Visual Basic Language | 47 |
|---|
| The .NET Languages | 47 |
| Variables and Data Types | 48 |
| Assignment and Initializers | 50 |
| Arrays | 51 |
| The ArrayList | 53 |
| Enumerations | 53 |
| Variable Operations | 55 |
| Advanced Math | 56 |
| Type Conversions | 57 |
| Object-Based Manipulation | 58 |
| The String Type | 59 |
| The DateTime and TimeSpan Types | 61 |
| The Array Type | 63 |
| Conditional Logic | 65 |
| The If . . . End If Block | 65 |
| The Select Case Block | 66 |
| Loops | 67 |
| The For ... Next Block | 67 |
| The For Each Block | 68 |
| The Do . . . Loop Block | 69 |
| Methods | 70 |
| Parameters | 71 |
| Method Overloading | 71 |
| Optional and Named Parameters | 72 |
| Delegates | 73 |
| The Last Word | 75 |
| CHAPTER 3 Types, Objects, and Namespaces | 76 |
|---|
| The Basics of Classes | 76 |
| Shared and Instance Members | 77 |
| A Simple Class | 78 |
| Building a Basic Class | 78 |
| Creating an Object | 80 |
| Adding Properties | 81 |
| Automatic Properties | 83 |
| Adding a Method | 83 |
| Adding a Constructor | 84 |
| Adding an Event | 85 |
| Handling an Event | 86 |
| Declarative Event Handling | 87 |
| Testing the Product Class | 88 |
| Value Types and Reference Types | 90 |
| Assignment Operations | 90 |
| Equality Testing | 91 |
| Passing Parameters by Reference and by Value | 91 |
| Reviewing .NET Types | 92 |
| Understanding Namespaces and Assemblies | 93 |
| Using Namespaces | 95 |
| Importing Namespaces | 96 |
| Assemblies | 97 |
| Advanced Class Programming | 97 |
| Inheritance | 98 |
| Shared Members | 99 |
| Casting Objects | 100 |
| Partial Classes | 102 |
| Generics | 104 |
| The Last Word | 105 |
| PART 2 Developing ASP.NETApplications | 106 |
|---|
| CHAPTER 4 Visual Studio | 107 |
|---|
| The Promise of Visual Studio | 107 |
| Creating Websites | 108 |
| Creating an Empty Web Application | 109 |
| Websites and Web Projects | 113 |
| The Hidden Solution Files | 114 |
| The Solution Explorer | 115 |
| Adding Web Forms | 116 |
| Migrating a Website from a Previous Version of Visual Studio | 117 |
| Designing a Web Page | 119 |
| Adding Web Controls | 120 |
| The Properties Window | 122 |
| The Anatomy of a Web Form | 124 |
| The Web Form Markup | 124 |
| The Page Directive | 125 |
| The Doctype | 126 |
| The Essentials of XHTML | 128 |
| Elements | 129 |
| Attributes | 131 |
| Formatting | 132 |
| A Complete Web Page | 132 |
| Writing Code | 134 |
| The Code-Behind Class | 134 |
| Adding Event Handlers | 134 |
| Outlining | 136 |
| IntelliSense | 137 |
| Member List | 137 |
| Error Underlining | 139 |
| AutoCorrect | 141 |
| Code Formatting and Coloring | 142 |
| Visual Studio Debugging | 142 |
| The Visual Studio Web Server | 143 |
| Single-Step Debugging | 144 |