Pro ASP.NET 4.5 in C#(5th) 无水印pdf

所需积分/C币:48 2017-10-02 11:33:06 12.42MB PDF
收藏 收藏

Pro ASP.NET 4.5 in C#(5th) 英文无水印pdf 第5版 pdf所有页面使用FoxitReader和PDF-XChangeViewer测试都可以打开 本资源转载自网络,如有侵权,请联系上传者或csdn删除 本资源转载自网络,如有侵权,请联系上传者或csdn删除
Contents at a glance About the author About the technical reviewer Acknowledgments,,,,黑黑,,黑,,,, XXXIX Part 1: Getting Startedmaan 1■■■ ■■■■■■■■■■■■■■■■■■ Chapter 1: Your First ASP. NET Application. 3 ■■■■■■■■■■■■■■■■■■■■■■■■■■口■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ Chapter 2: Putting aSP NeT in Context H ARRIBBRRRBRBRRRIRRIRIIIn 29 Chapter 3: Essential C# Language Features 37 Chapter 4: Using jquery ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■a■■■■ 75 Chapter 5: Essential Development Tools.. ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 101 Chapter 6: Sports Store: A Real Application a117 Chapter 7: Sports Store: Navigation cart ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 143 Chapter8: SportsStore: Completing the Cart,…,…,,,,,,…,…,,…,173 Chapter 9: Sports store: Administration mmammmmmaammaanmmmaammamnmmmaammamn 207 Chapter 10: Sports Store: Deployment ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 231 Chapter 11: Testable Web Apps .EB ammann 247 Part 2: the Chapter 12: Working with Web Forms 281 Chapter 13: Lifecycles and Context ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 313 Chapter14:M0dueS,,,,,,,,,,,,,,,,,,,,,,,,,345 Chapter 15: Handlers n369 CONTENTS AT A GLANCI Chapter 16: Page and Control Lifecycle Events ma u401 Chapter 17: Managing request Execution aaaaaa 425 Chapter 18: Managing State Data ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 451 Chapter 19: Caching 487 Chapter 20: Caching Output.mamamaammamaamRRaaIImImIa 515 Chapter21: Handling Errors,,,,,,,,,,…,…,…,,,,,…,…,549 Chapter 22: Managing Paths aaa 581 ■ Chapter23: URL Routing.,…,,,,,607 Chapter 24: Advanced URL Routing a mmmmmm RERaaaIaaaaaIaa 639 chapter 25: Authentication and authorization aa aman 667 Chapter 26: Membership ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 697 Chapter 27: ASPNET Configuration mmmmmmmmmammmmmmmaammmammaamaa 725 Chapter 28: Asynchronous Request Handling ng761 Part 3: Forms and controls ■■■■■■■■■■■■■■■■■■■口■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 777 Chapter 29: Working with Controls ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■口■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 779 Chapter 30: Forms and request validation maman 813 Chapter 31: Creating Custom Controls m amammmmmnmamaammm 839 Chapter 32: Stateful Chapter 33: Server-Side HTML Elements mn 901 Chapter 34: Model binding aaaammmmmmmmmaaammmmm 931 Chapter 35: Data Binding ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 961 Chapter 36: Basic Data Controls mmmmmammmmmmmmmman 991 Chapter 37: Complex Data Controlsmmmmmmmmmmmmmmmmmmmmmm 1021 Chapter 38: Other ASPNET Controls ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 1051 CONTENTS AT A GLANCE Part 4: client-Side Development ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■口■ 1073 Chapter 39: Managing Scripts and styles mmamamamammma. 1075 Chapter 40: Ajax and Web Services. a1099 Chapter 41: Client-Side validation. ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 1125 Chapter 42: Targeting Mobile Devices.mmmaamama. 1149 Index mmmm 1165 PART 1 Getting Started We start this book by jumping straight into AsP.NET and creating a simple application. We'll then explain the Ct language features and development tools that are needed for ASP.neT development and use them to create a realistic web application called Sports Store CHAPTER 1 Your First AsP. NET Application The best way to get started with asp. NEt is to jump right in. In this chapter, we will show you how to get set up for ASP.NET development and build your first ASP.NET application. The application we will build is simple, but it allows us to show you how to prepare your workstation for AsP. NET development, how the asP. neT development tools work, and-most importantly-how quickly you can get up and running with ASP.NET. We'll provide some context and background about the asp. net framework in the next chapter, but this book focuses on coding so that' s what we are going to start with Preparing your Workstation You only need two things for asP.NET development-a Windows 7 or Windows 8 workstation and Visual Studio, which is the Microsoft development environment. You probably have a Windows installation already, but you can usually find some pretty good deals if you need to buy a copy. Microsoft has discount schemes you can use if you are a student or teacher, or if you want to upgrade schemes from older Windows versions. Microsoft also has subscription schemes if you want wider access to its software products. You can get a 90-day trial of windows 8 from http://msdn.microsoftcom/en-us/windows/appsifyoudonthaveWindowsandyouwouldliketofamiliarize yourself with asp. neT development without making a financial commitment You need Visual Studio 2012 to build applications with ASP.NET 4.5, the version of the ASP. NET Framework we use in this book. Several different editions of Visual Studio 2012 are available, but we will be using the one that Microsoft makes available free of charge-Visual Studio Express 2012 for Web. Microsoft adds some nice features to the paid-for editions of Visual Studio, but you wont need them for this book. In addition, all of the figures throughout this book have been taken using the express edition running on windows 8. You can download the Express edition different editions of Visual Studio 2012 Express, each of which is used for a different kind of development--make sure that you get the Web edition, which supports ASP.NET applications Tip You can use any edition of visual Studio 2012 for the examples in this book. You will see slight differences in some of the dialog boxes and the menu and toolbar configurations, but otherwise you will be just fine Creating a New asPNet Project Start Visual Studio 2012 and select New Project from the File menu. You will see the New Project dialog box, which as the name suggests, you use to create new Visual Studio projects CHAPTER 1 YOUR FIRST ASP NET APPLICATION You will see a list of the available project types in the left-hand panel of the dialog box. navigate to Installed> Templates >Visual C#>Web and you will see the set of ASP.NeT projects available, as shown in Figure 1-1 New Project b Recent NET Framework 4,5 Sort by:Default Search installe Installed ASP. NET Empty Web Application Visual C# Type: Visua d Templates An empty pr p Visual basic e- ASP. NET Web Forms Application Visual c= application v 4 Visual c# Windows 1 ASP. NET MVC 3 Web Application Visual c- ASP. NET MVC Web Application Visual C= Silverlight Test ASP. NET Dynamic Data Entities Web Application Visual C= WCF h品 P PaLEa+Tar ASP. NET AAX Server Control Visual c= b Online Namer rtylnvites Location: PROjects Browse Solution namer M Create direct □ Add to sourc Figure 1-1. The New Project dialog box Tip Make sure you select Visual C# and not Visual Basic. You'll get some very odd behavior and errors if you try to follow our C# examples in a visual Basic project Select the ASP. NET Empty Web Application item from the central panel of the dialog box-some of the names of the different project types are similar so make sure that you get the right one. Make sure that. Net Framework 4. 5 is selected in the drop -down menu at the top of the screen and set the Name field to party Invites. click the ok button to create the new project. Tip Visual Studio will set the Solution Name field to Party Invites to match the project name. A Visual Studio solution is a container for one or more projects but for all of the examples in this book our solutions will contain just one project, which is typical for ASP. NET Framework development The ASP. NET Empty Web Application is the simplest of the project templates and creates a project that only contains a Web. config file, which contains the configuration information for your ASP. NET application. Visual Studio shows you files in the solution Explorer window, which you can see in Figure 1-2. The Solution Explorer is the principal tool for navigating around your project CHAPTER 1 YOUR FIRST ASP.NET APPLICATION Solution Explorer ⊙oC回应 Search Solution Explorer (Ctrl+2) Solution Partylnvites'(1 project PartyInvites >/ Properties ■■ References b y Web. config igure 1-2. The Visual Studio Solution Explorer window Adding a new Web Form As you saw when you created the Visual Studio project, there are different kinds of AsP. NET applications. For the type of application we describe in this book, content is generated from a Web Form. This is a misleading name, as we explain in Chapter 2, but for the moment it is enough to know that we add content to our application by adding new Web form items To add a new Web Form to the project right-click the party invites project entry in the solution explorer window and select Add >Web form from the pop -up menu When prompted, enter default as the name for the new item, as shown in Figure 1-3 Specify Name for Item Item name: Default OK Cancel Figure 1-3. Setting the name for the new Web Form Note Throughout this book, we build up each example so that you can follow along in your own visual Studio project If you don't want to follow along you can download a complete set of example projects from apress. com. We have organized the examples by chapter and have included all of the files you will need Click the OK button to dismiss the dialog and create the new item. You will see that Visual Studio has added a Default. aspx file to the project in the Solution Explorer and opened the file for editing. You can see the initial tents of the file in Listing 1 Listing 1-1. The initial contents of the Default. aspx file <%60@ Page Language="C#" AutoEventWireup="true"Code Behind="Default. aspx.c Inherits="PartyInvites Default CHAPTER 1 YOUR FIRST ASP NET APPLICATION <I DOCTYPE html> chtmlxmins="Http://"> <head runat="server> < title》</ title </head> <body> <form id="form1" runat=server> <div> </div> </form> </body> </html> A Web Form file is, at its heart, an enhanced html file The element that has the < and %> tags gives away the act this isnt a regular hTml file as do the runat attributes present in the head and form elements Well explain what all of this means later, but for now we just want to emphasize that we are indeed working with HTML In Listing 1-2, you can see that we have added some standard hTml elements to the Default. aspx file Listing 1-2. Adding standard HTML elements to the Default. aspx file <% Page Language="C#" AutoEventwireup="true" CodeBehind="Default.aspxcS Inherits="PartyInvites Default"%> <! DOCTYPE html> htmlxmlns="> <head runat="server < title》</ title /head> <body> <form id="form1" runat="server> <div> h>HeL1o<《/h1 <P>This is a new web form</p> </div> </form> </body> </htmI> een We have added an h1 and a p element containing some simple text. Nothing is specific to ASP.NET in these elements-they are standard hTml Testing the Example Application The Visual Studio toolbar contains a drop-down list with the names of the browsers you have installed on your workstation(click the small down arrow to the right of the name to show the list) You can see our list in Figure 1-4, which shows that we have several browsers installed. At the very least, you will have entries for Internet Explorer and Page Inspector(a tool that helps you debug your HTML and that we demonstrate later in Chapter 5)

试读 127P Pro ASP.NET 4.5 in C#(5th) 无水印pdf
限时抽奖 低至0.43元/次
身份认证后 购VIP低至7折
  • 至尊王者

关注 私信
Pro ASP.NET 4.5 in C#(5th) 无水印pdf 48积分/C币 立即下载
Pro ASP.NET 4.5 in C#(5th) 无水印pdf第1页
Pro ASP.NET 4.5 in C#(5th) 无水印pdf第2页
Pro ASP.NET 4.5 in C#(5th) 无水印pdf第3页
Pro ASP.NET 4.5 in C#(5th) 无水印pdf第4页
Pro ASP.NET 4.5 in C#(5th) 无水印pdf第5页
Pro ASP.NET 4.5 in C#(5th) 无水印pdf第6页
Pro ASP.NET 4.5 in C#(5th) 无水印pdf第7页
Pro ASP.NET 4.5 in C#(5th) 无水印pdf第8页
Pro ASP.NET 4.5 in C#(5th) 无水印pdf第9页
Pro ASP.NET 4.5 in C#(5th) 无水印pdf第10页
Pro ASP.NET 4.5 in C#(5th) 无水印pdf第11页
Pro ASP.NET 4.5 in C#(5th) 无水印pdf第12页
Pro ASP.NET 4.5 in C#(5th) 无水印pdf第13页
Pro ASP.NET 4.5 in C#(5th) 无水印pdf第14页
Pro ASP.NET 4.5 in C#(5th) 无水印pdf第15页
Pro ASP.NET 4.5 in C#(5th) 无水印pdf第16页
Pro ASP.NET 4.5 in C#(5th) 无水印pdf第17页
Pro ASP.NET 4.5 in C#(5th) 无水印pdf第18页
Pro ASP.NET 4.5 in C#(5th) 无水印pdf第19页
Pro ASP.NET 4.5 in C#(5th) 无水印pdf第20页

试读结束, 可继续阅读

48积分/C币 立即下载