Synopses & Reviews
ASP.NET 2.0 is an amazing technology that allows you to develop web sites and applications with very little hassle, and its power and depth enable it to host even the most complex applications available. Using code examples in C#, this invaluable beginner's guide shows you how to program web applications in ASP.NET 2.0 and see dynamic results with minimal effort.
Through detailed explanations and working C# code examples, this popular author team eases you into the world of ASP.NET development and gradually introduces you to all sorts of interesting ASP.NET tricks and tools. You'll quickly see how ASP.NET 2.0 is designed to ensure a significant reduction in the amount of code you have to write—and, in turn, to make your life easier.
What you will learn from this book
- Why Visual Web Developer is an ideal environment for building feature-rich ASP.NET 2.0 applications with C#
- How to secure web sites, providing login functionality and role-based access to content
- Useful techniques for safely updating data, using ASP.NET 2.0's built-in data handling capabilities
- How centralized site design can be easily achieved
- How to add e-commerce functionality to a site
- Methods for enhancing an application's performance
Who this book is for
This book is for anyone new to web programming who wants to program dynamic, feature-rich web applications in ASP.NET 2.0. It will also be ideal for programmers seeking to upgrade their ASP 3 knowledge to ASP.NET, or programmers from non-Microsoft web disciplines who need to learn ASP.NET 2.0.
Wrox Beginning guides are crafted to make learning programming languages and technologies easier than you think, providing a structured, tutorial format that will guide you through all the techniques involved.
Synopsis
This book continues the strong Wrox Beginning tradition with an approach featuring numerous detailed examples, step by step teaching, and clear explanations of how each key bit of code works. The book takes a task oriented approach, teaching readers how to build a specific part of a complete web site.
With the introduction of the Visual Web Developer tool, there's no need for ASP.NET coders - especially beginners - to hand code any pages. In fact, starting an ASP.NET 2.0 site with Visual Web Developer is so easy that the first several chapters of the book can be done with very little code at all.
When the book does get to more code intensive chapters in the 2nd half of the book, C# is the language used in the examples here. Even then, the authors do their best to show readers the minimum amount of code they need to write to accomplish a task, continuing to work as much as possible with the tools built into Visual Web Developer.
The completed web site the readers finish from the tasks in the book contains these features plus more: Membership and login Stylized themes e-commerce Along the way, readers also learn how to incorporate XML, monitor and improve site performance, debug the code and site, deploy a site, and implement security
About the Author
Chris Hart normally works at Trinity Expert Systems Plc, based in Coventry (UK) but is currently on maternity leave. She's worked on several major .NET, SharePoint, and CMS applications. She enjoys having a job where she gets to learn and play with new technologies on a regular basis, often working on-site with customers. She's been using.NET since the pre-Alpha days, and yet still enjoys the fun of working with beta software.
Chris lives in Birmingham (UK, not Alabama) with her extremely understanding husband James and baby Nathan, and is discovering that motherhood is more challenging than developing a CMS systems for a major client. She's currently trying to work out how to make the home network toddlerproof.
I'd like to thank James for being so understanding - this was the hardest one yet, and you were great. Thanks also to my brother Rob for your inspiring creativity - best of luck in your final year at Uni. Thanks to Lou for designing the Wrox United site, and for being such a fantastic friend. Finally, thanks to Nathan for waiting eight more days after I finished my final drafts before arriving into the world.
Chris Hart contributed Chapters 3-5 and 11 and Appendix C to this book.
John Kauffman was born in Philadelphia, the son of a chemist and a nurse. He received his degrees from The Pennsylvania State University, the Colleges of Science and Agriculture. His early research was for Hershey foods in the genetics of the chocolate tree and the molecular biology of chocolate production. Since 1993 John has focused on explaining technology in the classroom and in books.
In his spare time, John is an avid sailor and youth sailing coach. He also enjoys jazz music and drumming. In addition to technical material, he manages to read the New Yorker magazine from cover-to-cover each week.
John Kauffman contributed Chapters 1, 2, 7, and 8 and Appendix D to this book.
Dave Sussman is an independent trainer, consultant, and writer, who inhabits that strange place called beta land. It's full of various computers, multiple boot partitions, VPC images, and very occasionally, stable software. When not writing books or testing alpha and beta software, Dave can be found working with a variety of clients helping to bring ASP.NET projects into fruition. He is a Microsoft MVP, and a member of the ASP Insiders and INETA Speakers Bureau. You can find more details about Dave and his books at his official website (www.ipona.com ) or the site he shares with Alex Homer (http://daveandal.net).
Dave Sussman contributed Chapters 6, 9, 14, and 15 and Appendix E to this book.
Chris Ullman is a free4lance web developer and technical author who has spent many years stewing in ASP / ASP.NET, like a teabag left too long in the pot. Coming from a Computer Science background, he started initially as a UNIX/Linux guru, who gravitated towards MS technologies during the summer of ASP (1997). He cut his teeth on Wrox Press ASP guides, and since then, he has written on over 20 books, most notably as lead author for Wrox's bestselling Beginning ASP / ASP.NET 1.x series, and has contributed chapters to books on PHP, ColdFusion, JavaScript, Web Services, C#, XML, and other Internet-related technologies to esoteric to mention, now swallowed by up in the quicksands of the dot.com boom.
Quitting Wrox as a full-time employee in August 2001, he branched out into VB.NET/C#programming and ASP.NET development and started his own business, CUASP Consulting Ltd, in April 2003. He maintains a variety of sites from www.cuasp.co.uk, his "work" site, to www.atomicwise.com, a selection of his writings on music and art. The birth of his twins Jay and Luca in February 2005 took chaos to a new level. He now divides his time between protecting the twins from their over-affectionate three-year-old brother Nye, composing electronic sounds on bits of dilapidated old keyboards for his music project Open E, and tutoring his cats in the art of peaceful co-existence and not violently mugging each other on the stairs.
Chris Ullman contributed Chapters 10, 12, 13, and 16 and Appendix B to this book.
Table of Contents
Acknowledgments.
Introduction.
Chapter 1: An Introduction to ASP.NET 2.0 and the Wrox United Application.
The Site You Will Build.
ASP.NET 2.0—A Powerful Tool to Build Dynamic Web Sites.
Simple Solutions for Common Web Site Tasks.
Where Does ASP.NET 2.0 Fit with Other Technology?
Exploring the Wrox United Application.
Getting Started with Your Wrox United Site.
VWD Express—A Development Environment.
Summary.
Exercises.
Chapter 2: Site Design.
General Design Objectives.
Master and Content Pages.
Additional Capabilities of Master Pages.
Creating a Site Map.
General Guidelines for Site Design.
Standard Files for ASP.NET 2.0 Applications.
Troubleshooting Site Design Errors.
Summary.
Exercises.
Chapter 3: Page Design.
Static Page Design.
The World of HTML.
Dynamic Content.
Introduction to Server Controls.
Types of Server Controls.
Summary.
Exercises.
Chapter 4: Membership and Identity.
Security Basics.
ASP.NET Security.
Wrox United Security.
Summary.
Exercises.
Chapter 5: Styling with Themes.
Styling a Site.
Themes in Wrox United.
Styling and Layout Best Practices.
Summary.
Exercises.
Chapter 6: Events and Code.
Web Server Architecture.
Server-Side Events.
Adding Events to the Page.
Events Aren’t Triggered by Users Only.
Indirect Events.
Canceling Events.
Global Events.
Summary.
Exercises.
Chapter 7: Reading Data.
Introducing Databases.
Using ASP.NET 2.0’s Data Controls.
Data Source Controls.
Data-Bound Controls.
Data Source Controls with Parameters.
Multiple Data Controls Working Together.
Working with XML Data.
Binding Syntax.
Summary.
Exercises.
Chapter 8: Writing Data.
Introduction to Writing Data.
Changing Existing Records.
Adding New Records.
Deleting Records.
Uploading Pictures.
Improving the Upload of Pictures.
Summary.
Exercises.
Chapter 9: Code.
Variables and Data Types.
Statements.
Namespaces.
Working with Classes.
Variable Scope and Lifetime.
Generics.
Summary.
Exercises.
Chapter 10: Componentization.
The Separation of Code from Content.
The Separation of Code from Design.
Code-Behind.
Creating a Code-Behind File.
Data Layers.
User Controls.
Composite Controls.
Assemblies and Custom Server Controls.
Summary.
Exercises.
Chapter 11: Roles and Profiles.
The Importance of Roles.
Introducing Roles in Wrox United.
Configuring Page-Level Authorization.
Working with Roles in Code.
Enabling User Profiles.
Building a Profile.
Managing Anonymous Shopping Carts.
Summary.
Exercises.
Chapter 12: Web Services.
Looking at Web Services.
The Life Cycle of a Web Service.
The Structure of Your Web Service.
Creating a Web Service.
Testing Your Web Service.
Web Service Discovery.
Adding the Fixture Service to Your Application.
Putting It All Together.
Remote Web Services—PocketPC Application.
Web Service Security.
Summary.
Exercises.
Chapter 13: E-Commerce.
The E-Commerce Pipeline.
The Product Catalog.
The Shopping Cart.
Checkout.
Secure Transactions.
What Else Can You Do?
Summary.
Exercises.
Chapter 14: Performance.
Simple Techniques.
Pages and Code.
Caching.
Designing for Performance.
Testing Performance.
Summary.
Exercises.
Chapter 15: Dealing with Errors.
Defensive Coding.
Exception Handling.
Exceptions Best Practices.
Global Exception Handling.
Custom Error Pages.
Debugging and Tracing.
Summary.
Exercises.
Chapter 16: Deployment, Builds, and Finishing Up.
Site Deployment.
Testing and Maintenance.
Where to Now?
References.
Summary.
Exercise.
Appendix A: Exercise Answers.
Appendix B: Setup.
System Requirements.
Visual Web Developer Express Installation.
Web Site Folder Setup.
Wrox United Installation.
Troubleshooting.
Appendix C: Wrox United Database Design.
Standalone Tables.
Wrox United Store Tables.
Appendix D: VWD Database Explorer.
Opening the Database Explorer.
Adding an Existing Database to the Database Explorer.
Viewing Database Diagrams.
Exploring a Table’s Structure.
Observing and Editing Data of Existing Tables.
Creating a New Database.
Creating a New Table and Adding Data.
Examining and Creating Views.
Examining a Stored Procedure (SPROC).
Summary.
Appendix E: CSS and HTML Quick Reference.
Styling Pages and Controls.
CSS Reference.
Common HTML Tags by Category.
HTML Common Attributes to the CSS Property.
Recommended Reading.
Index.