Sams Teach Yourself ASP.NET 3.5 in 24 Hours: Complete Starter Kit

Overview

Sams Teach Yourself ASP.NET 3.5 in 24 Hours

Scott Mitchell

Starter Kit

DVD includes Microsoft Visual Web Developer 2008 Express Edition

In just 24 sessions of one hour or less, you will be up and running with ASP.NET 3.5. Using a straightforward, step-by-step approach, each lesson builds upon a real-world foundation forged in both technology...

See more details below
Multimedia Set (DVD-ROM Included)
$35.99
BN.com price
(Save 10%)$39.99 List Price

Pick Up In Store

Reserve and pick up in 60 minutes at your local store

Other sellers (Multimedia Set)
  • All (23) from $1.99   
  • New (2) from $26.54   
  • Used (21) from $1.99   
Sending request ...

Overview

Sams Teach Yourself ASP.NET 3.5 in 24 Hours

Scott Mitchell

Starter Kit

DVD includes Microsoft Visual Web Developer 2008 Express Edition

In just 24 sessions of one hour or less, you will be up and running with ASP.NET 3.5. Using a straightforward, step-by-step approach, each lesson builds upon a real-world foundation forged in both technology and business matters, allowing you to learn the essentials of building dynamic, data-driven web applications from the ground up.

Step-by-step instructions carefully walk you through the most common questions, issues, and tasks.

Q&As, quizzes, and exercises at the end of each lesson help you build and test your knowledge.

By the Way, Did You Know?, and Watch Out! boxes point out shortcuts and solutions.

Learn how to…

  • Design and create ASP.NET web pages
  • Use Microsoft Visual Web Developer to quickly and professionally build ASP.NET websites
  • Collect input from users visiting your web pages
  • Display database data through a web page
  • Edit, insert, delete, sort, and page through database data from an ASP.NET page
  • Build a website that supports user accounts
  • Use Ajax to design interactive web user interfaces

As editor and main contributor to 4GuysFromRolla.com, a popular ASP.NET resource website, Scott Mitchell has authored more than a thousand articles on Microsoft web technologies since 1998. In addition to his vast collection of online articles, Scott has written six previous books on ASP and ASP.NET: Sams Teach Yourself Active Server Pages 3.0 in 21 Days (Sams); Designing Active Server Pages (O’Reilly); ASP.NET: Tips, Tutorials, and Code (Sams); ASP.NET Data Web Controls Kick Start (Sams); Sams Teach Yourself ASP.NET in 24 Hours (Sams); and Sams Teach Yourself ASP.NET 2.0 in 24 Hours (Sams). Scott has also written a number of magazine articles and is a regular columnist for Microsoft’s MSDN Magazine.

DVD Includes:

  • Microsoft Visual Web Developer 2008 Express Edition

On the Web:

  • Register your book at informit.com/title/9780672329975 for access to author code, examples, updates and corrections as they become available.

Category: Microsoft Programming/ASP.NET

Covers: ASP.NET 3.5

User Level: Beginning—Intermediate

Read More Show Less

Product Details

  • ISBN-13: 9780672329975
  • Publisher: Sams
  • Publication date: 6/28/2008
  • Series: Sams Teach Yourself Series
  • Edition description: DVD-ROM Included
  • Pages: 648
  • Sales rank: 1,060,556
  • Product dimensions: 7.00 (w) x 9.10 (h) x 1.40 (d)

Meet the Author

As editor and main contributor to 4GuysFromRolla.com, a popular ASP.NET resource website, Scott Mitchell has authored more than a thousand articles on Microsoft web technologies since 1998. In addition to his vast collection of online articles, Scott has written six previous books on ASP and ASP.NET: Sams Teach Yourself Active Server Pages 3.0 in 21 Days (Sams); Designing Active Server Pages (O’Reilly); ASP.NET: Tips, Tutorials, and Code (Sams); ASP.NET Data Web Controls Kick Start (Sams); Teach Yourself ASP.NET in 24 Hours (Sams); and Teach Yourself ASP.NET 2.0 in 24 Hours (Sams). Scott has also written a number of magazine articles and is a regular columnist for Microsoft’s MSDN Magazine. Scott’s nonwriting accomplishments include speaking at numerous ASP.NET user groups and conferences across the country. Scott regularly teaches classes on ASP.NET and related web technologies at the University of California–San Diego University Extension. Scott also works as an independent software developer. Scott can be reached at mitchell@4GuysFromRolla.com; his blog is available at www.ScottOnWriting.NET.

Read More Show Less

Read an Excerpt

IntroductionIntroduction

As the World Wide Web continues its meteoric growth, websites have matured from simple collections of static HTML pages to data-driven dynamic web applications. For example, websites such as eBay or Amazon.com are much more than a collection of HTML pages—they are complex applications that happen to be accessed through the Internet. Although many competing technologies exist for building data-driven websites, this book shows how to use the latest version of Microsoft's popular ASP.NET technology for creating web applications.

ASP.NET web applications are composed of individual ASP.NET web pages. As we will see in numerous examples throughout this book, these ASP.NET pages can display HTML, collect user input, and interact with databases. ASP.NET pages contain a mix of both HTML and source code. It is the source code of an ASP.NET page that allows for the more advanced features, such as accessing data from a database, or sending an email. The source code of an ASP.NET web page can be written in any one of a number of programming languages. For this book we will be using Microsoft's Visual Basic programming language. Don't worry if you've never programmed in Visual Basic, or even if you have never programmed at all. Starting with Hour 5, "Understanding Visual Basic's Variables and Operators," we spend three hours examining programming language concepts and the Visual Basic syntax.

To ease ASP.NET web page development, Microsoft provides a free development editor, Visual Web Developer, which is included in this book's accompanying CD. Visual Web Developer simplifies creating both the HTML and source codeportions of ASP.NET pages. The HTML for an ASP.NET web page can be quickly created by using the Designer, which is a What You See Is What You Get (WYSIWYG) graphical editor. With the Designer, you can drag and drop various HTML elements onto an ASP.NET web page, moving them around with a few clicks of the mouse. Likewise, Visual Web Developer offers tools and shortcuts that help with creating an ASP.NET page's code.Audience and Organization

This book is geared for developers new to ASP.NET, whether or not you've had past experience with HTML or programming languages. By the end of this book you'll be able to create and deploy your own dynamic, data-driven web applications using ASP.NET.

This book's 24 hours are divided into four parts. Part I introduces you to ASP.NET, HTML, Visual Web Developer, and Visual Basic. Hour 1, "Getting Started with ASP.NET 3.5," begins with an overview of ASP.NET and then walks you through installing the .NET Framework, Visual Web Developer, and other necessary components. Hour 3, "Using Visual Web Developer," showcases Visual Web Developer, which is the powerful development editor you'll be using throughout this book to create ASP.NET web pages. Hours 5, 6, and 7 examine the syntax and semantics of the Visual Basic programming language.

ASP.NET offers a variety of user interface elements for collecting user input, including text boxes, check boxes, drop-down lists, and radio buttons. In Part II you will see how to collect and process user input. Hour 10, "Using Text Boxes to Collect Input," examines using single-line, multi-line, and password text boxes, while Hour 11, "Collecting Input Using Drop-Down Lists, Radio Buttons, and Check Boxes," examines alternative user input controls.

Part III shows how easy it is to build data-driven websites with ASP.NET. Starting in Hour 13, "An Introduction to Databases," we begin our look at building websites that interact with databases. Typically, data-driven websites enable visitors to view, update, delete, and insert data into the database from an ASP.NET page. In Hour 15, "Displaying Data with the Data Web Controls," you will learn how to display database data in a web page. Hour 16, "Deleting, Inserting, and Editing Data," examines how to edit, insert, and delete data.

Part IV highlights tools provided by ASP.NET and Visual Web Developer that help with building professional, easy-to-use websites. In Hour 20, "Defining a Site Map and Providing Site Navigation," you'll see how to define a website's navigational structure and display menus, treeviews, and breadcrumbs. Hour 22, "Using Master Pages to Provide Sitewide Page Templates," examines master pages, which enable web designers to create a web page template that can be applied to all pages across the site.Conventions Used in This Book

This book uses several design elements and conventions to help you prioritize and reference the information it contains:

***

Note - By the Way boxes provide useful sidebar information that you can read immediately or circle back to without losing the flow of the topic at hand.

***
***

Tip - Did You Know? boxes highlight information that can make your Visual Basic programming more effective.

***
***

Caution - Watch Out! boxes focus your attention on problems or side effects that can occur in specific situations.

***

New terms appear in a semibold typeface for emphasis.

In addition, this book uses various typefaces to help you distinguish code from regular English. Code is presented in a monospace font. Placeholders—words or characters that represent the real words or characters you would type in code—appear in italic monospace. When you are asked to type or enter text, that text appears in bold monospace. Menu options are separated by a comma. For example, when you should open the File menu and choose the New Project menu option, the text says "Select File, New Project."

Some code statements presented in this book are too long to appear on a single line. In these cases, a line-continuation character is used to indicate that the following line is a continuation of the current statement. Furthermore, some code listings include line numbers. These numbers are used to refer to specific lines of code in the text and are not part of the code syntax.

I hope you enjoy reading this book as much as I enjoyed writing it.

Happy Programming!

Scott Mitchell

mitchell@4guysfromrolla.com

© Copyright Pearson Education. All rights reserved.

Read More Show Less

Table of Contents

Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

Part I: Overview of ASP.NET 3.5

HOUR 1 Getting Started with ASP.NET 3.5. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

2 Understanding the ASP.NET Programming Model. . . . . . . . . . . . . . . . . . . . . . . . . . . 25

3 Using Visual Web Developer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59

4 Designing, Creating, and TestingASP.NET Web Pages . . . . . . . . . . . . . . . . . . . . . . 77

5 Understanding Visual Basic’s Variables and Operators. . . . . . . . . . . . . . . . . . . 107

6 Managing Program Flow with Visual Basic’s Control Structures. . . . . . . 131

7 Working with Objects in Visual Basic. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159

8 ASP.NET Web Controls for Displaying Text. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171

Part II: Collecting and Processing User Input

HOUR 9 Web Form Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193

10 Using Text Boxes to Collect Input . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215

11 Collecting Input Using Drop-Down Lists, Radio Buttons,

and Checkboxes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235

12 Validating User Input with Validation Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261

Part III: Working with Databases

HOUR 13 An Introduction to Databases. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 297

14 Accessing Data with the Data Source Web Controls. . . . . . . . . . . . . . . . . . . . . . . 319

15 Displaying Data with the Data Web Controls. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 347

16 Deleting, Inserting, and Editing Data. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 373

17 Working with Data-Bound DropDownLists,

RadioButtons, and Checkboxes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 407

18 Exploring Data Binding and Other Data-Related Topics. . . . . . . . . . . . . . . . . 429

19 Using Templated Data Web Controls . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 453

Part IV: Site Navigation, User Management, Page Layout, AJAX,

and Deployment

HOUR 20 Defining a Site Map and Providing Site Navigation . . . . . . . . . . . . . . . . . . . . . . 483

21 Managing Your Site’s Users . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 509

22 Using Master Pages to Provide Sitewide Page Templates . . . . . . . . . . . . . . . . . 539

23 Building More Responsive Web Pages with ASP.NET AJAX. . . . . . . . . . . . . . 563

24 Deploying Your Website. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 581

Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 603

Read More Show Less

Preface

Introduction

As the World Wide Web continues its meteoric growth, websites have matured from simple collections of static HTML pages to data-driven dynamic web applications. For example, websites such as eBay or Amazon.com are much more than a collection of HTML pages—they are complex applications that happen to be accessed through the Internet. Although many competing technologies exist for building data-driven websites, this book shows how to use the latest version of Microsoft's popular ASP.NET technology for creating web applications.

ASP.NET web applications are composed of individual ASP.NET web pages. As we will see in numerous examples throughout this book, these ASP.NET pages can display HTML, collect user input, and interact with databases. ASP.NET pages contain a mix of both HTML and source code. It is the source code of an ASP.NET page that allows for the more advanced features, such as accessing data from a database, or sending an email. The source code of an ASP.NET web page can be written in any one of a number of programming languages. For this book we will be using Microsoft's Visual Basic programming language. Don't worry if you've never programmed in Visual Basic, or even if you have never programmed at all. Starting with Hour 5, "Understanding Visual Basic's Variables and Operators," we spend three hours examining programming language concepts and the Visual Basic syntax.

To ease ASP.NET web page development, Microsoft provides a free development editor, Visual Web Developer, which is included in this book's accompanying CD. Visual Web Developer simplifies creating both the HTML and source code portions of ASP.NET pages. The HTML for an ASP.NET web page can be quickly created by using the Designer, which is a What You See Is What You Get (WYSIWYG) graphical editor. With the Designer, you can drag and drop various HTML elements onto an ASP.NET web page, moving them around with a few clicks of the mouse. Likewise, Visual Web Developer offers tools and shortcuts that help with creating an ASP.NET page's code.

Audience and Organization

This book is geared for developers new to ASP.NET, whether or not you've had past experience with HTML or programming languages. By the end of this book you'll be able to create and deploy your own dynamic, data-driven web applications using ASP.NET.

This book's 24 hours are divided into four parts. Part I introduces you to ASP.NET, HTML, Visual Web Developer, and Visual Basic. Hour 1, "Getting Started with ASP.NET 3.5," begins with an overview of ASP.NET and then walks you through installing the .NET Framework, Visual Web Developer, and other necessary components. Hour 3, "Using Visual Web Developer," showcases Visual Web Developer, which is the powerful development editor you'll be using throughout this book to create ASP.NET web pages. Hours 5, 6, and 7 examine the syntax and semantics of the Visual Basic programming language.

ASP.NET offers a variety of user interface elements for collecting user input, including text boxes, check boxes, drop-down lists, and radio buttons. In Part II you will see how to collect and process user input. Hour 10, "Using Text Boxes to Collect Input," examines using single-line, multi-line, and password text boxes, while Hour 11, "Collecting Input Using Drop-Down Lists, Radio Buttons, and Check Boxes," examines alternative user input controls.

Part III shows how easy it is to build data-driven websites with ASP.NET. Starting in Hour 13, "An Introduction to Databases," we begin our look at building websites that interact with databases. Typically, data-driven websites enable visitors to view, update, delete, and insert data into the database from an ASP.NET page. In Hour 15, "Displaying Data with the Data Web Controls," you will learn how to display database data in a web page. Hour 16, "Deleting, Inserting, and Editing Data," examines how to edit, insert, and delete data.

Part IV highlights tools provided by ASP.NET and Visual Web Developer that help with building professional, easy-to-use websites. In Hour 20, "Defining a Site Map and Providing Site Navigation," you'll see how to define a website's navigational structure and display menus, treeviews, and breadcrumbs. Hour 22, "Using Master Pages to Provide Sitewide Page Templates," examines master pages, which enable web designers to create a web page template that can be applied to all pages across the site.

Conventions Used in This Book

This book uses several design elements and conventions to help you prioritize and reference the information it contains:


Note - By the Way boxes provide useful sidebar information that you can read immediately or circle back to without losing the flow of the topic at hand.



Tip - Did You Know? boxes highlight information that can make your Visual Basic programming more effective.



Caution - Watch Out! boxes focus your attention on problems or side effects that can occur in specific situations.


New terms appear in a semibold typeface for emphasis.

In addition, this book uses various typefaces to help you distinguish code from regular English. Code is presented in a monospace font. Placeholders—words or characters that represent the real words or characters you would type in code—appear in italic monospace. When you are asked to type or enter text, that text appears in bold monospace. Menu options are separated by a comma. For example, when you should open the File menu and choose the New Project menu option, the text says "Select File, New Project."

Some code statements presented in this book are too long to appear on a single line. In these cases, a line-continuation character is used to indicate that the following line is a continuation of the current statement. Furthermore, some code listings include line numbers. These numbers are used to refer to specific lines of code in the text and are not part of the code syntax.

I hope you enjoy reading this book as much as I enjoyed writing it.

Happy Programming!

Scott Mitchell
mitchell@4guysfromrolla.com

© Copyright Pearson Education. All rights reserved.

Read More Show Less

Customer Reviews

Be the first to write a review
( 0 )
Rating Distribution

5 Star

(0)

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 all of 2 Customer Reviews
  • Posted April 20, 2010

    I Also Recommend:

    Want to get productive with ASP.NET 3.5 quickly?

    With ASP.NET 3.5 in 24 Hours, Scott Mitchell proves very insightful to the needs of an experienced programmer who is new to ASP.NET. The knowledge is communicated in a straightforward manner and goes right to the heart of techniques that one needs to know to function in this programming environment. The examples are clear, relevant, and they work in the real world. Also, the examples are provided in both Visual Basic and C#. This book is not intended to examine every aspect of programming in ASP.NET, but rather to get you working quickly. It reveals aspects that are confusing, and makes them simple. This book, no doubt, has saved me a ton of time.

    Was this review helpful? Yes  No   Report this review
  • Posted March 10, 2009

    Great Book

    I am a web development student. I purchased this book as an additional learning tool to my class text book. I ended up using this book 90% of the time. This book was easier to locate things in and easier to understand. It also has very helpful example codes you can download and contains the disk for the Visual Web Developer 2008 program. Author Scott Mitchell did a great job as usual!

    Was this review helpful? Yes  No   Report this review
Sort by: Showing all of 2 Customer Reviews

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