Beginning ASP.NET 4.5: in C# and VB - Imar Spaanjaars - E-Book

Beginning ASP.NET 4.5: in C# and VB E-Book

Imar Spaanjaars

3,0
34,99 €

oder
-100%
Sammeln Sie Punkte in unserem Gutscheinprogramm und kaufen Sie E-Books und Hörbücher mit bis zu 100% Rabatt.
Mehr erfahren.
Beschreibung

The ultimate programming guide to ASP.NET 4.5, by popular author and Microsoft MVP Imar Spaanjaars

Updated for ASP.NET 4.5, this introductory book is filled with helpful examples and contains a user-friendly, step-by-step format. Written by popular author and Microsoft ASP.NET MVP Imar Spaanjaars, this book walks you through ASP.NET, Microsoft's technology for building dynamically generated web pages. This edition retains the highly accessible approach to building the Planet Wrox website example, an online community site featuring product reviews, picture sharing, bonus content for registered users, and more.

  • Contains the comprehensive guide to the latest technology additions to ASP.NET 4.5
  • Shows how to build basic ASP.NET web pages and configure their server
  • Includes information on how to add features with pre-built server controls
  • Reveals how to design pages and make them consistent
  • Contains the information needed for getting user input and displaying data

Beginning ASP.NET 4.5 in C# and VB uses Spaanjaars's distinct writing style to put you at ease with learning ASP.NET 4.5.

Sie lesen das E-Book in den Legimi-Apps auf:

Android
iOS
von Legimi
zertifizierten E-Readern

Seitenzahl: 1475

Veröffentlichungsjahr: 2012

Bewertungen
3,0 (18 Bewertungen)
2
4
6
4
2
Mehr Informationen
Mehr Informationen
Legimi prüft nicht, ob Rezensionen von Nutzern stammen, die den betreffenden Titel tatsächlich gekauft oder gelesen/gehört haben. Wir entfernen aber gefälschte Rezensionen.



Table of Contents

Chapter 1: Getting Started with ASP.NET 4.5

Microsoft Visual Studio Express for Web

Creating Your First ASP.NET 4.5 Website

An Introduction to ASP.NET 4.5

A Tour of the IDE

Customizing the IDE

The Sample Application

Practical Tips on Visual Studio

Summary

Chapter 2: Building an ASP.NET Website

Creating Websites with Visual Studio 2012

Working with Files in Your Website

Working with Web Forms

Practical Tips on Working with Web Forms

Summary

Chapter 3: Designing Your Web Pages

Why Do You Need CSS?

An Introduction to CSS

Working with CSS in Visual Studio

Practical Tips on Working with CSS

Summary

Chapter 4: Working with ASP.NET Server Controls

Introduction to Server Controls

A Closer Look at ASP.NET Server Controls

Types of Controls

The ASP.NET State Engine

Practical Tips on Working with Controls

Summary

Chapter 5: Programming Your ASP.NET Web Pages

Introduction to Programming

Data Types and Variables

Statements

Organizing Code

Object Orientation Basics

Practical Tips on Programming

Summary

Chapter 6: Creating Consistent Looking Websites

Consistent Page Layout with Master Pages

Using a Centralized Base Page

Themes

Skins

Practical Tips on Creating Consistent Pages

Summary

Chapter 7: Navigation

Different Ways to Move Around Your Site

Using the Navigation Controls

Programmatic Redirection

Practical Tips on Navigation

Summary

Chapter 8: User Controls

Introduction to User Controls

Adding Logic to Your User Controls

Practical Tips on User Controls

Summary

Chapter 9: Validating User Input

Gathering Data from the User

Processing Data at the Server

Practical Tips on Validating Data

Summary

Chapter 10: ASP.NET AJAX

Introducing Ajax

Using ASP.NET AJAX in Your Projects

Using Web Services and Page Methods in Ajax Websites

Practical Ajax Tips

Summary

Chapter 11: jQuery

An Introduction to jQuery

jQuery Syntax

Modifying the DOM with jQuery

Effects with jQuery

jQuery and Validation

Practical Tips on jQuery

Summary

Chapter 12: Introducing Databases

What Is a Database?

Different Kinds of Relational Databases

Using SQL to Work with Database Data

Retrieving and Manipulating Data with SQL

Creating Your Own Tables

Practical Database Tips

Summary

Chapter 13: Displaying and Updating Data

Data Controls

Data Source and Data-Bound Controls Working Together

Customizing the Appearance of the Data Controls

Updating and Inserting Data

Practical Tips for Displaying and Updating Data

Summary

Chapter 14: LINQ and the ADO.NET Entity Framework

Introducing LINQ

Introducing the ADO.NET Entity Framework

Mapping Your Data Model to an Object Model

Introducing Query Syntax

Using Server Controls with LINQ Queries

Practical LINQ and ADO.NET Entity Framework Tips

Summary

Chapter 15: Working with Data—Advanced Topics

Wrox.com Code Downloads for this Chapter

Formatting Your Controls Using Styles

Handling Events

Hand-Coding Data Access Code

Caching

Practical Data Tips

Summary

Chapter 16: Security in Your ASP.NET 4.5 Website

Wrox.com Code Downloads for this Chapter

Introducing Security

Introducing the Login Controls

The Role Manager

Practical Security Tips

Summary

Chapter 17: Personalizing Websites

Wrox.com Code Downloads for this Chapter

Understanding Profile

Other Ways of Dealing with Profile

Practical Personalization Tips

Summary

Chapter 18: Exception Handling, Debugging, and Tracing

Wrox.com Code Downloads for this Chapter

Exception Handling

The Basics of Debugging

Tools Support for Debugging

Debugging Client-Side Script

Debugging with the Page Inspector

Tracing Your ASP.NET Web Pages

Practical Debugging Tips

Summary

Chapter 19: Deploying Your Website

Wrox.com Code Downloads for this Chapter

Preparing Your Website for Deployment

Introducing Bundling and Minification

Copying Your Website

Running Your Site Under IIS

Moving Data to a Remote Server

The Deployment Checklist

What's Next

Summary

Appendix A: Exercise Answers

Chapter 1

Chapter 2

Chapter 3

Chapter 4

Chapter 5

Chapter 6

Chapter 7

Chapter 8

Chapter 9

Chapter 10

Chapter 11

Chapter 12

Chapter 13

Chapter 14

Chapter 15

Chapter 16

Chapter 17

Chapter 18

Appendix B: Confi guring SQL Server 2012

Configuring SQL Server 2012

Configuring Application Services

Foreword

Introduction

Who This Book Is For

What This Book Covers

How This Book Is Structured

What You Need to Use This Book

Conventions

Source Code

Errata

p2p.wrox.com

Advertisement

Chapter 1

Getting Started with ASP.NET 4.5

What you will learn in this chapter:

How to acquire and install Visual Studio Express 2012 for Web and Visual Studio 2012

How to create your first website with Visual Studio Express 2012

How an ASP.NET page is processed by the server and sent to the browser

How you can use and customize the development environment

Ever since the first release of the .NET Framework 1.0 in early 2002, Microsoft has put a lot of effort and development time into ASP.NET, the part of the .NET Framework that enables you to build rich web applications. This first release meant a radical change from the older Microsoft technology to build websites called ActiveServerPages (ASP), now often referred to as classicASP. The introduction of ASP.NET 1.0 and the associated Visual Studio .NET gave developers the following benefits over classic ASP:

A clean separation between presentation and code. With classic ASP, your programming logic was often scattered throughout the HTML of the page, making it hard to make changes to the page later.

A development model that was much closer to the way desktop applications are programmed. This made it easier for the many Visual Basic desktop programmers to make the switch to web applications.

A feature-rich development tool (called Visual Studio .NET) that enabled developers to create and code their web applications visually.

A choice between a number of

object-oriented programming (OOP)

languages, of which Visual Basic .NET and C# (pronounced as C-Sharp) are now the most popular.

Access to the entire .NET Framework, which for the first time meant that web developers had a unified and easy way to access many advanced features to work with databases, files, e-mail, networking tools, and much more.

Despite the many advantages of ASP.NET over the older model, using ASP.NET also meant an increase in complexity and the knowledge needed to build applications with it, making it harder for many new programmers to get started with ASP.NET.

After the initial release in 2002, Microsoft released another version of the .NET Framework (called .NET 1.1) and the development IDE (called Visual Studio .NET 2003). Many people saw this as a service pack for the initial release, although it also brought a lot of new enhancements in both the framework and the development tools.

In November 2005, Visual Studio 2005 and ASP.NET 2.0 were released. To the pleasant surprise of many developers around the world, Microsoft had again been able to drastically improve and expand the product, adding many features and tools that helped reduce the complexity that was introduced with ASP.NET 1.0. New wizards and smart controls made it possible to reduce the code required to build an application, decreasing the learning curve for new developers and increasing their productivity.

In November 2007, Microsoft released Visual Studio 2008 and the ASP.NET 3.5 framework, followed by Visual Studio 2010 and ASP.NET 4 in March 2010. Both versions added a lot of new functionality, including LINQ (discussed in Chapter 14), the integration of the AJAX Framework (which you learn more about in Chapter 10), the ADO.NET Entity Framework (discussed in Chapter 14), the inclusion of jQuery (discussed in Chapter 11), and more.

The current versions, Visual Studio 2012 and ASP.NET 4.5, build on top of the successful Visual Studio 2010 and ASP.NET 4 releases, leaving many of the beloved features in place while adding new features and tools in other areas.

Over the next 19 chapters, you learn how to build full-featured ASP.NET websites using Visual Studio Express 2012 for Web, Microsoft's free development tool for ASP.NET web applications, which is also part of the full Visual Studio 2012 suite. This book guides you through the process of creating a fully functional, database-driven website, starting with a bare-bones website in the next chapter, all the way down to the deployment of it to a production environment in Chapter 19.

The sample site that comes with this book and all the examples are built with Visual Studio Express 2012 for Web (VSEW), so it's important that you have it installed on your development machine. The next section shows you how to acquire and install VSEW. Once you have it up and running, you see how to create your first website, followed by an extensive tour through the many features of VSEW.

Microsoft Visual Studio Express for Web

Although you could theoretically write ASP.NET web applications with Notepad or another text editor alone, you really want to install a copy of Microsoft Visual Studio (VS). VS hosts an enormous number of tools that will help you in rapidly creating complex ASP.NET web applications.

Visual Studio comes in two flavors: as a standalone and free version called Microsoft Visual Studio Express 2012 for Web, and as part of the larger development suite called Visual Studio 2012, which is also available in different editions, each with its own price tag. With the commercial editions of Visual Studio, the web components are fully integrated. You just start Visual Studio 2012 and then create a Web Site Project or a Web Application Project, which in turn enables the web components of Visual Studio.

Although the Express edition of Visual Studio is free, it contains all the features and tools you need to create complex and feature-rich web applications. All the examples you find in the book can be built with the free Express edition, so there's no need to shell out big bucks for the commercial versions of Visual Studio 2012 to follow along with this book.

I'll use the term Visual Studio (VS) to refer to both the commercial and free versions of Visual Studio. When talking about the free edition specifically, I'll use the terms Express edition or Visual Studio Express 2012 (VSEW).

Getting Visual Studio is easy. You can download it from the Microsoft site as discussed next.

Getting Visual Studio

You can get the free Visual Studio Express 2012 for Web from the Microsoft site at www.microsoft .com/express/. On the Express homepage, follow the Downloads link until you reach the page that offers the downloads for the Express products, including VSEW. From this page, you can download VSEW as a Web Install, where you download only the installer, while the remaining files are downloaded during the installation process. Make sure you choose Visual Studio Express 2012 for Web from the page, and not one of the other free Express products or one of the older editions of Visual Studio.

Don't be fooled by the file size of the Web Install download, which is just a few megabytes. The file you download is just the installer that downloads the required files over the Internet. The total download depends on your current system and will be somewhere between 180 MB and 270 MB.

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!

Lesen Sie weiter in der vollständigen Ausgabe!