Begining ASP.NET 4.5 in C#.pdf

(16050 KB) Pobierz
THE EXPERT’S VOICE
®
IN .NET
For your convenience Apress has placed some of the front
matter material after the index. Please use the Bookmarks
and Contents at a Glance links to access them.
Contents at a Glance
About the Author ......................................................................................................
xxvii
About the Technical Reviewers .................................................................................
xxix
Acknowledgments .....................................................................................................
xxxi
Introduction .............................................................................................................
xxxiii
Part 1: Introducing .NET............................................................................1
Chapter 1: The Big Picture ...........................................................................................3
Chapter 2: The C# Language ......................................................................................15
Chapter 3: Types, Objects, and Namespaces .............................................................47
Part 2: Developing ASP.NET Applications...............................................77
Chapter 4: Visual Studio ............................................................................................79
Chapter 5: Web Form Fundamentals .......................................................................121
Chapter 6: Web Controls ..........................................................................................163
Chapter 7: Error Handling, Logging, and Tracing .....................................................203
Chapter 8: State Management .................................................................................233
Part 3: Building Better Web Forms.......................................................269
Chapter 9: Validation ...............................................................................................271
Chapter 10: Rich Controls........................................................................................293
Chapter 11: User Controls and Graphics..................................................................319
Chapter 12: Styles, Themes, and Master Pages ......................................................345
Chapter 13: Website Navigation ..............................................................................387
v
Contents At A GLAnCe
Part 4: Working with Data....................................................................423
Chapter 14: ADO.NET Fundamentals ........................................................................425
Chapter 15: Data Binding.........................................................................................473
Chapter 16: The Data Controls .................................................................................511
Chapter 17: Files and Streams ................................................................................551
Chapter 18: XML ......................................................................................................581
Part 5: Website Security.......................................................................615
Chapter 19: Security Fundamentals ........................................................................617
Chapter 20: Membership .........................................................................................639
Chapter 21: Profiles .................................................................................................675
Part 6: Advanced ASP.NET....................................................................697
Chapter 22: Component-Based Programming .........................................................699
Chapter 23: Caching ................................................................................................729
Chapter 24: LINQ and the Entity Framework ...........................................................753
Chapter 25: ASP.NET AJAX .......................................................................................791
Chapter 26: Deploying ASP.NET Applications ..........................................................825
Index ...........................................................................................................................867
vi
Introduction
ASP.NET is Microsoft’s platform for developing web applications. Using ASP.NET, you can create e-commerce
shops, data-driven portal sites, and just about anything else you can find on the Internet. Best of all, you don’t
need to paste together a jumble of HTML and script code in order to program the Web. Instead, you can create
full-scale web applications using nothing but code and a design tool such as Visual Studio.
The cost of all this innovation is the learning curve. To master ASP.NET, you need to learn how to use
an advanced design tool (Visual Studio), a toolkit of objects (the .NET Framework), and an object-oriented
programming language (such as C#). Taken together, these topics provide more than enough to overwhelm any
first-time web developer.
Beginning ASP.NET 4.5 in C#
assumes you want to master ASP.NET, starting from the basics. Using this
book, you’ll build your knowledge until you understand the concepts, techniques, and best practices for writing
sophisticated web applications. The journey is long, but it’s also satisfying. At the end of the day, you’ll find that
ASP.NET allows you to tackle challenges that are simply out of reach on many other platforms.
About This Book
This book explores ASP.NET, which is a core part of Microsoft’s .NET Framework. The .NET Framework is not
a single application—it’s a collection of technologies bundled into one marketing term. The .NET Framework
includes languages such as C# and VB, an engine for hosting programmable web pages, a model for interacting
with databases (ADO.NET), a higher-level framework for performing queries (LINQ and the Entity Framework),
and a class library stocked with tools for everything from reading files to validating a password. To master ASP.
NET, you need to learn about each of these ingredients.
This book covers all these topics from the ground up. As a result, you’ll find yourself learning many
techniques that will interest any .NET developer, even those who create Windows applications. For example,
you’ll learn about component-based programming, you’ll discover structured error handling, and you’ll see how
to access files, XML, and relational databases. You’ll also learn the key topics you need for web programming,
such as state management, web controls, and caching. By the end of this book, you’ll be ready to create your own
rich web applications and make them available over the Internet.
Who Should Read This Book
This book is aimed at anyone who wants to create dynamic websites with ASP.NET. Ideally, you’ll have experience with
a previous version of a programming language such as C or Java. If not, you should be familiar with basic programming
concepts (loops, conditional structures, arrays, and so on), whether you’ve learned them in Visual Basic, Pascal,
Turing, or a completely different programming language. This is the only requirement for reading this book.
Understanding HTML and XHTML (the markup languages used to write web pages) will help you, but it’s
not required. ASP.NET works at a higher level, allowing you to deal with full-featured web controls instead of raw
web page markup. However, you’ll get a quick overview of HTML5 fundamentals in Chapter
4,
and you’ll learn
about CSS, the Cascading Style Sheet standard, in Chapter
12.
This book will also appeal to programmers who have some experience with C# and .NET but haven’t
worked with ASP.NET in the past. However, if you’ve used a previous version of ASP.NET, you’ll probably be more
interested in a faster-paced book such as
Pro ASP.NET 4.5 in C#
instead.
xxxiii
Zgłoś jeśli naruszono regulamin