Spaanjaars
Build rich web sites with
the latest version of ASP.NET
wrox.com
Programmer
Forums
Beginning ASP.NET 4:
•
Demonstrates how to build ASP.NET 4 web pages
•
Explains adding features with pre-built server controls
•
Reviews working with the development tools to create ASP.NET web sites
•
Shares techniques for creating consistent-looking web sites
•
Teaches you how to implement jQuery and AJAX techniques in your
web sites
ã
Shows you how to work with databases and the Microsoftđ ADO.NET
Entity Framework
•
Addresses securing and personalizing your site
•
Investigates exception handling, debugging, and tracing pages
Imar Spaanjaars is a Microsoft ASP.NET MVP and runs his own company called
De Vier Koeden in the Netherlands, specializing in Internet and intranet applications
built with Microsoft technologies like ASP.NET 4. He is the author or coauthor of
several books, including ASP.NET 2.0 Instant Results and Beginning ASP.NET 3.5
in C# and VB, and is one of the top contributors to the Wrox Community
Forum at p2p.wrox.com.
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.
Wrox Programmer to Programmer™
Beginning
Join our Programmer to
Programmer forums to ask
and answer programming
questions about this book,
join discussions on the
hottest topics in the industry,
and connect with fellow
programmers from around
the world.
Code Downloads
Take advantage of free code
samples from this book, as
well as code samples from
hundreds of other books, all
ready to use.
Read More
Find articles, ebooks, sample
chapters, and tables of contents
for hundreds of books, and
more reference resources on
programming topics that matter
to you.
ASP.NET 4
ASP.NET is the part of the .NET Framework that enables you to
build rich, dynamic web sites. The latest version—ASP.NET 4—boasts
numerous improvements to the previous iteration, including Web
Forms enhancements and jQuery support. This step-by-step book
walks you through building rich web sites with ASP.NET 4 and is
packed with in-depth examples in both C# and VB. With hands-on
exercises that take you right into the action, you’ll learn how to build web
sites firsthand while you get a good look at what goes on behind
the scenes when you view an ASP.NET 4 page in your browser.
Join the discussion @ p2p.wrox.com
in C# and VB
Beginning
www.free-ebooks-download.org
ASP.NET 4
in C# and VB
Foreword by Vishal R. Joshi, Lead Program Manager, Microsoft Web Platform & Tools
Web Development/ASP.NET
$44.99 USA
$53.99 CAN
Imar Spaanjaars
Related Wrox Books
Beginning Visual C# 2010
Programmer to Programmer
™
Get more out of
wrox.com
ISBN: 978-0-470-50226-6
Using this book, you will first cover the fundamentals such as variables, flow control, and object-oriented programming and
gradually build your skills for Web and Windows programming, Windows forms, and data access. Step-by-step directions walk
you through processes and invite you to “Try it Out,” at every stage. By the end, you’ll be able to write useful programming code
following the steps you’ve learned in this thorough, practical book. If you’ve always wanted to master Visual C# programming, this
book is the perfect one-stop resource.
Professional ASP.NET 4: in C# and VB
ISBN: 978-0-470-50220-4
Written by three highly recognized and regarded ASP.NET experts, this book provides all-encompassing coverage on ASP.NET 4 and
offers a unique approach of featuring examples in both C# and VB, as is the incomparable coverage of core ASP.NET. After a
fast-paced refresher on essentials such as server controls, the book delves into expert coverage of all the latest capabilities of
ASP.NET 4. You’ll learn site navigation, personalization, membership, role management, security, and more.
Professional C# 4 and .NET 4
ISBN: 978-0-470-50225-9
After a quick refresher on C# basics, the author dream team moves on to provide you with details of language and
framework with C#, working in Visual Studio 2010 with C#, and more. With this book, you’ll quickly get up to date on
all the newest capabilities of C# 4.
Professional Visual Basic 2010 and .NET 4
Interact
Join the Community
Take an active role online by participating in our
P2P forums @ p2p.wrox.com
Sign up for our free monthly newsletter at
newsletter.wrox.com
ISBN: 978-0-470-50224-2
If you’ve already covered the basics and want to dive deep into VB and .NET topics that professional programmers use most, this
is your guide. You’ll explore all the new features of Visual Basic 2010 as well as all the essential functions that you need, including
.NET features such as LINQ to SQL, LINQ to XML, WCF, and more. Plus, you’ll examine exception handling and debugging, Visual
Studio features, and ASP.NET web programming.
Professional Visual Studio 2010
Wrox Online Library
Browse
Hundreds of our books are available online
Ready for more Wrox? We have books and
through Books24x7.com
e-books available on .NET, SQL Server, Java,
www.free-ebooks-download.org
XML, Visual Basic, C#/ C++, and much more!
Wrox Blox
Download short informational pieces and code
to keep you up to date and out of trouble!
ISBN: 978-0-470-54865-3
Written by an author team of veteran programmers and developers, this book gets you quickly up to speed on what you can expect from
Visual Studio 2010. Packed with helpful examples, this comprehensive guide examines the features of Visual Studio 2010, and walks you
through every facet of the Integrated Development Environment (IDE), from common tasks and functions to its powerful tools.
Visual Basic 2010 Programmer’s Reference
ISBN: 978-0-470-49983-2
Visual Basic 2010s Programmer’s Reference is a language tutorial and a reference guide to the 2010 release of Visual Basic.
The tutorial provides basic material suitable for beginners but also includes in-depth content for more advanced developers.
Visual Studio 2010 and .NET 4 Six-in-One
ISBN: 978-0-470-49948-1
This comprehensive resource offers a single resource for all you need to know to get productive with .NET 4. It reviews all the important
features of .NET 4, including .NET charting and ASP.NET charting, ASP.NET dynamic data and jQuery, and F#. The coverage is divided
into six distinctive parts for easy navigation and offers a practical approach and complete examples.
WPF Programmer’s Reference: Windows Presentation Foundation with C# 2010 and .NET 4
ISBN: 978-0-470-47722-9
Written by a leading expert on Microsoft graphics programming, this richly illustrated book provides an introduction to WPF
development and explains fundamental WPF concepts. It is packed with helpful examples and progresses through a range of topics
that gradually increase in their complexity.
Contact Us.
We always like to get feedback from our readers. Have a book idea?
Need community support? Let us know by e-mailing
Beginning
ASP.NET 4: in C# and VB
Foreword . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxv
Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxvii
Chapter 1
Getting Started with ASP.NET 4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Chapter 2
Building an ASP.NET Web Site . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Chapter 3
Designing Your Web Pages. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
ChaPter 4
Working with ASP.NET Server Controls. . . . . . . . . . . . . . . . . . . . . . . . . . . 105
Chapter 5
Programming Your ASP.NET Web Pages. . . . . . . . . . . . . . . . . . . . . . . . . . 139
Chapter 6
Creating Consistent Looking Web Sites . . . . . . . . . . . . . . . . . . . . . . . . . . 197
Chapter 7
Navigation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239
ChaPter 8
User Controls. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271
ChaPter 9
Validating User Input. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 297
Chapter 10 ASP.NET AJAX. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 331
ChaPter 11
jQuery. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 367
Chapter 12
Introducing Databases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 403
Chapter 13
Displaying and Updating Data. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 433
Chapter 14
LINQ and the ADO.NET Entity Framework. . . . . . . . . . . . . . . . . . . . . . . . 477
Chapter 15
Working with Data — Advanced Topics. . . . . . . . . . . . . . . . . . . . . . . . . . 529
Chapter 16
Security in Your ASP.NET 4 Web Site. . . . . . . . . . . . . . . . . . . . . . . . . . . . 579
Chapter 17
Personalizing Web Sites. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 619
Chapter 18
Exception Handling, Debugging, and Tracing . . . . . . . . . . . . . . . . . . . . 655
Chapter 19
Deploying Your Web Site. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 697
www.free-ebooks-download.org
Appendix A Exercise Answers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 731
Appendix B Configuring SQL Server 2008. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 757
Index. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 777
502211ffirs.indd 1
2/19/10 9:58:33 AM
www.free-ebooks-download.org
502211ffirs.indd 2
2/19/10 9:58:33 AM
Beginning
ASP.NET 4
www.free-ebooks-download.org
502211ffirs.indd 3
2/19/10 9:58:33 AM
Related Wrox Books
Beginning Visual C# 2010
Programmer to Programmer
™
Get more out of
wrox.com
ISBN: 978-0-470-50226-6
Using this book, you will first cover the fundamentals such as variables, flow control, and object-oriented programming and
gradually build your skills for Web and Windows programming, Windows forms, and data access. Step-by-step directions walk
you through processes and invite you to “Try it Out,” at every stage. By the end, you’ll be able to write useful programming code
following the steps you’ve learned in this thorough, practical book. If you’ve always wanted to master Visual C# programming, this
book is the perfect one-stop resource.
Professional ASP.NET 4: in C# and VB
ISBN: 978-0-470-50220-4
Written by three highly recognized and regarded ASP.NET experts, this book provides all-encompassing coverage on ASP.NET 4 and
offers a unique approach of featuring examples in both C# and VB, as is the incomparable coverage of core ASP.NET. After a
fast-paced refresher on essentials such as server controls, the book delves into expert coverage of all the latest capabilities of
ASP.NET 4. You’ll learn site navigation, personalization, membership, role management, security, and more.
Professional C# 4 and .NET 4
ISBN: 978-0-470-50225-9
After a quick refresher on C# basics, the author dream team moves on to provide you with details of language and
framework with C#, working in Visual Studio 2010 with C#, and more. With this book, you’ll quickly get up to date on
all the newest capabilities of C# 4.
Professional Visual Basic 2010 and .NET 4
Interact
Join the Community
Take an active role online by participating in our
P2P forums @ p2p.wrox.com
Sign up for our free monthly newsletter at
newsletter.wrox.com
ISBN: 978-0-470-50224-2
If you’ve already covered the basics and want to dive deep into VB and .NET topics that professional programmers use most, this
is your guide. You’ll explore all the new features of Visual Basic 2010 as well as all the essential functions that you need, including
.NET features such as LINQ to SQL, LINQ to XML, WCF, and more. Plus, you’ll examine exception handling and debugging, Visual
Studio features, and ASP.NET web programming.
Professional Visual Studio 2010
Wrox Online Library
Browse
Hundreds of our books are available online
through Books24x7.com
Ready for more Wrox? We have books and
e-books available on .NET, SQL Server, Java,
XML, Visual Basic, C#/ C++, and much more!
Wrox Blox
Download short informational pieces and code
to keep you up to date and out of trouble!
ISBN: 978-0-470-54865-3
Written by an author team of veteran programmers and developers, this book gets you quickly up to speed on what you can expect from
Visual Studio 2010. Packed with helpful examples, this comprehensive guide examines the features of Visual Studio 2010, and walks you
through every facet of the Integrated Development Environment (IDE), from common tasks and functions to its powerful tools.
Visual Basic 2010 Programmer’s Reference
ISBN: 978-0-470-49983-2
Visual Basic 2010s Programmer’s Reference is a language tutorial and a reference guide to the 2010 release of Visual Basic.
The tutorial provides basic material suitable for beginners but also includes in-depth content for more advanced developers.
Visual Studio 2010 and .NET 4 Six-in-One
ISBN: 978-0-470-49948-1
This comprehensive resource offers a single resource for all you need to know to get productive with .NET 4. It reviews all the important
features of .NET 4, including .NET charting and ASP.NET charting, ASP.NET dynamic data and jQuery, and F#. The coverage is divided
into six distinctive parts for easy navigation and offers a practical approach and complete examples.
WPF Programmer’s Reference: Windows Presentation Foundation with C# 2010 and .NET 4
ISBN: 978-0-470-47722-9
Written by a leading expert on Microsoft graphics programming, this richly illustrated book provides an introduction to WPF
development and explains fundamental WPF concepts. It is packed with helpful examples and progresses through a range of topics
that gradually increase in their complexity.
Contact Us.
We always like to get feedback from our readers. Have a book idea?
Need community support? Let us know by e-mailing
Prepared for SUSAN ROERS/ email0 Order number0 64048685 This PDF is for the purchaser’s personal use in accordance with the Wrox Terms of
Service and under US copyright as stated on this book’s copyright page. If you did not purchase this copy/ please visit www.wrox.com to purchase your own copy.
Spaanjaars
Build rich web sites with
the latest version of ASP.NET
wrox.com
Programmer
Forums
Beginning ASP.NET 4:
•
Demonstrates how to build ASP.NET 4 web pages
•
Explains adding features with pre-built server controls
•
Reviews working with the development tools to create ASP.NET web sites
•
Shares techniques for creating consistent-looking web sites
•
Teaches you how to implement jQuery and AJAX techniques in your
web sites
ã
Shows you how to work with databases and the Microsoftđ ADO.NET
Entity Framework
•
Addresses securing and personalizing your site
•
Investigates exception handling, debugging, and tracing pages
Imar Spaanjaars is a Microsoft ASP.NET MVP and runs his own company called
De Vier Koeden in the Netherlands, specializing in Internet and intranet applications
built with Microsoft technologies like ASP.NET 4. He is the author or coauthor of
several books, including ASP.NET 2.0 Instant Results and Beginning ASP.NET 3.5
in C# and VB, and is one of the top contributors to the Wrox Community
Forum at p2p.wrox.com.
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.
Wrox Programmer to Programmer™
Beginning
Join our Programmer to
Programmer forums to ask
and answer programming
questions about this book,
join discussions on the
hottest topics in the industry,
and connect with fellow
programmers from around
the world.
Code Downloads
Take advantage of free code
samples from this book, as
well as code samples from
hundreds of other books, all
ready to use.
Read More
Find articles, ebooks, sample
chapters, and tables of contents
for hundreds of books, and
more reference resources on
programming topics that matter
to you.
ASP.NET 4
ASP.NET is the part of the .NET Framework that enables you to
build rich, dynamic web sites. The latest version—ASP.NET 4—boasts
numerous improvements to the previous iteration, including Web
Forms enhancements and jQuery support. This step-by-step book
walks you through building rich web sites with ASP.NET 4 and is
packed with in-depth examples in both C# and VB. With hands-on
exercises that take you right into the action, you’ll learn how to build web
sites firsthand while you get a good look at what goes on behind
the scenes when you view an ASP.NET 4 page in your browser.
Join the discussion @ p2p.wrox.com
in C# and VB
Beginning
ASP.NET 4
in C# and VB
Foreword by Vishal R. Joshi, Lead Program Manager, Microsoft Web Platform & Tools
Web Development/ASP.NET
$44.99 USA
$53.99 CAN
Prepared for SUSAN ROERS/ email0 Order number0 64048685 This PDF is for the purchaser’s personal use in accordance with the Wrox Terms of
Service and under US copyright as stated on this book’s copyright page. If you did not purchase this copy/ please visit www.wrox.com to purchase your own copy.
Imar Spaanjaars