Thư viện tri thức trực tuyến
Kho tài liệu với 50,000+ tài liệu học thuật
© 2023 Siêu thị PDF - Kho tài liệu học thuật hàng đầu Việt Nam

Introducing Microsoft WebMatrix
Nội dung xem thử
Mô tả chi tiết
Introducing Microsoft®
WebMatrix™
Introducing Microsoft®
WebMatrix™
Laurence Moroney
Published with the authorization of Microsoft Corporation by:
O’Reilly Media, Inc.
1005 Gravenstein Highway North
Sebastopol, California 95472
Copyright © 2011 by Laurence Moroney
All rights reserved. No part of the contents of this book may be reproduced or transmitted in any form or by
any means without the written permission of the publisher.
ISBN: 978-0-7356-4970-5
1 2 3 4 5 6 7 8 9 M 6 5 4 3 2 1
Printed and bound in the United States of America.
Microsoft Press books are available through booksellers and distributors worldwide. If you need support related
to this book, email Microsoft Press Book Support at [email protected]. Please tell us what you think
of this book at http://www.microsoft.com/learning/booksurvey.
Microsoft and the trademarks listed at http://www.microsoft.com/about/legal/en/us/IntellectualProperty/
Trademarks/EN-US.aspx are trademarks of the Microsoft group of companies. All other marks are property
of their respective owners.
The example companies, organizations, products, domain names, email addresses, logos, people, places, and
events depicted herein are fictitious. No association with any real company, organization, product, domain
name, email address, logo, person, place, or event is intended or should be inferred.
This book expresses the author’s views and opinions. The information contained in this book is provided without
any express, statutory, or implied warranties. Neither the authors, O’Reilly Media, Inc., Microsoft Corporation,
nor its resellers, or distributors will be held liable for any damages caused or alleged to be caused either directly
or indirectly by this book.
Acquisitions and Developmental Editor: Russell Jones
Production Editor: Kristen Borg
Editorial Production and Illustration: Online Training Solutions, Inc.
Technical Reviewer: John Grieb
Copyeditor: Kathy Krause
Indexer: Ellen Troutman Zaig
Cover Design: Twist Creative • Seattle
Cover Composition: Karen Montgomery
This book is dedicated to my family: my wonderful wife, Rebecca;
my awesome daughter, Claudia; and my home run–slammin’ son, Christopher.
I also and always want to thank the God of Abraham, Isaac, Jacob,
and Jesus for making it all possible.
vii
Contents at a Glance
1 Introducing WebMatrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
2 A Tour of WebMatrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
3 Programming with WebMatrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
4 Using Images in WebMatrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
5 Using Video in WebMatrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
6 Forms and Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
7 Databases in WebMatrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
8 Exposing Your Site Through
Social Networking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
9 Adding Email to Your Site . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163
10 Building a Simple Web Application: Styles, Layout, and
Templates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
11 Building a Simple Web Application: Using Data . . . . . . . . . . . . 191
12 WebMatrix and Facebook . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213
13 WebMatrix and PayPal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229
14 Building Your Own Web Helpers . . . . . . . . . . . . . . . . . . . . . . . . . 251
15 Deploying Your Site . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267
16 WordPress, WebMatrix, and PHP . . . . . . . . . . . . . . . . . . . . . . . . . 281
A WebMatrix Programming Basics . . . . . . . . . . . . . . . . . . . . . . . . . 305
ix
Table of Contents
Foreword . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xv
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvii
Who Should Read This Book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xviii
Who Should Not Read This Book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xviii
Organization of This Book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xviii
System Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xviii
Code Samples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xviii
Installing the Code Samples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xix
Using the Code Samples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xix
Errata and Book Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xix
We Want to Hear from You . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xx
Stay in Touch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xx
Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xx
1 Introducing WebMatrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
An Introduction to Web Stacks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
The ASP.NET Web Pages Stack . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
The ASP.NET Stack . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
The PHP on Windows Stack . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Installing WebMatrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Building Your First WebMatrix Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
The WebMatrix Stack . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
The IIS Express Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
The SQL Server Compact Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
The ASP.NET Web Pages Framework . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
What do you think of this book? We want to hear from you!
Microsoft is interested in hearing your feedback so we can continually improve our
books and learning resources for you. To participate in a brief online survey, please visit:
microsoft.com/learning/booksurvey
x Table of Contents
2 A Tour of WebMatrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Launching WebMatrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
The Web Application Gallery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Creating a Site by Using the Web Application Gallery . . . . . . . . . . . . . . . . . 20
Creating a Site by Using a Template . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Understanding the WebMatrix Workbench . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
The Site Workspace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
The Files Workspace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
The Databases Workspace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
The Reports Workspace . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
3 Programming with WebMatrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Server Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Your First Programmed Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
Making Your Page Dynamic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
Sending Data to the Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
4 Using Images in WebMatrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
Creating a Page That Uses an Image . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
Creating Thumbnails and Links . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
Programming the Image Tag . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
Using the WebImage Helper . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
Using Web.config to Change the Allowed Image Size . . . . . . . . . . . . 80
Resizing an Image with WebImage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
Further Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
5 Using Video in WebMatrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
Using Video in Your Site . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
Creating a Simple Video Site in WebMatrix . . . . . . . . . . . . . . . . . . . . . 88
Embedding a Media Player by Using the <object> Tag . . . . . . . . . . . 89
Using the Video Helper . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93
Using Flash Video . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
Using Silverlight Video . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
Using the HTML5 <video> Tag . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101
Table of Contents xi
6 Forms and Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
How Forms Work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
A Simple Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104
Exploring HTTP Headers with Fiddler . . . . . . . . . . . . . . . . . . . . . . . . . 106
Exploring the Form Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
Text Boxes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109
Password Boxes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
Option Buttons . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
The checkbox Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
The TextArea Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
The select Control for Lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
Capturing Form Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122
7 Databases in WebMatrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
Creating a Database with WebMatrix............................... 123
Using a Database in Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
Adding Data to the Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
Editing Your Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
Deleting Records from the Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
8 Exposing Your Site Through
Social Networking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
Sharing Your Site with Others . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
Using Delicious . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148
Using Digg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
Using Google Reader . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153
Using Facebook . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154
Using Reddit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156
Using StumbleUpon . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
Using Twitter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
Adding Twitter to Your Site . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
Displaying a Twitter Profile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159
Displaying Twitter Search Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160
Rendering Xbox Gamercards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162
xii Table of Contents
9 Adding Email to Your Site . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163
Using Simple Mail Transfer Protocol (SMTP) . . . . . . . . . . . . . . . . . . . . . . . . 163
Using the WebMail Helper . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164
Building a Simple Email Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172
10 Building a Simple Web Application: Styles, Layout, and
Templates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
Creating and Styling Your Site . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
Getting Your Page Ready for CSS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176
Adding Some Style with CSS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178
Using CSS Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184
Using Layout Pages and Templates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187
Using RenderBody() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190
11 Building a Simple Web Application: Using Data . . . . . . . . . . . . 191
Creating the Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191
Creating a Data Retrieval Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192
Creating an Add Data Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197
Handling Submitted Data from an Add Form . . . . . . . . . . . . . . . . . . 199
Adding Data to the Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200
Creating an Edit Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202
Handling Submitted Data from an Edit Form . . . . . . . . . . . . . . . . . . 202
Updating the Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206
Creating a Delete Data Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212
12 WebMatrix and Facebook . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213
Accessing ASP.NET Web Pages Administration . . . . . . . . . . . . . . . . . . . . . . 213
Installing the Facebook Helpers from NuGet . . . . . . . . . . . . . . . . . . . . . . . 217
Getting Started with the Facebook Helpers . . . . . . . . . . . . . . . . . . . . . . . . . 218
Configuring and Initializing Facebook . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219
Using a Facebook Comments Box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220
Using the Facebook Activity Feed.................................. 223
Using Facebook Recommendations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224
Using the Facepile Feed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225
Using the Live Stream Feed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227
Table of Contents xiii
13 WebMatrix and PayPal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229
Signing Up for PayPal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229
Creating a PayPal Sandbox . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231
Using PayPal with WebMatrix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235
Initializing the PayPal Helper . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236
Creating a Shopping Cart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237
Running the PayPal-Enabled Bakery........................... 238
Exploring the PayPalOrder.cshtml Page . . . . . . . . . . . . . . . . . . . . . . . 241
Setting Up Other Types of Payment . . . . . . . . . . . . . . . . . . . . . . . . . . 242
Going Further . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248
Going Live . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249
14 Building Your Own Web Helpers . . . . . . . . . . . . . . . . . . . . . . . . . 251
Using the Microsoft Translator Widget . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251
Creating a Helper for the Widget . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255
Creating a Helper by Using the Translator API . . . . . . . . . . . . . . . . . . . . . . 257
Getting an API Key . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257
Using the Translator API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258
Creating the Helper . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261
Using the Helper . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265
15 Deploying Your Site . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267
Finding Web Hosting............................................. 267
Using the Publish Settings Dialog Box . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
Creating a WordPress-Based Site . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 279
16 WordPress, WebMatrix, and PHP . . . . . . . . . . . . . . . . . . . . . . . . . 281
Creating a WordPress Site . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281
Configuring Your WordPress Site . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291
Posts and Pages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291
Configuring the Site Theme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294
Using the Code Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 296
Using WebMatrix to Edit WordPress . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 299
Creating a Facebook Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 299
Editing Your Code with WebMatrix . . . . . . . . . . . . . . . . . . . . . . . . . . . 302
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 304
xiv Table of Contents
A WebMatrix Programming Basics . . . . . . . . . . . . . . . . . . . . . . . . . 305
Getting Started with WebMatrix Programming . . . . . . . . . . . . . . . . . . . . . 305
Variables and Data Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 305
Common Programming Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . 307
Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 313
What do you think of this book? We want to hear from you!
Microsoft is interested in hearing your feedback so we can continually improve our
books and learning resources for you. To participate in a brief online survey, please visit:
microsoft.com/learning/booksurvey