Details

Beginning ASP.NET for Visual Studio 2015


Beginning ASP.NET for Visual Studio 2015


1. Aufl.

von: William Penberthy

28,99 €

Verlag: Wiley
Format: EPUB
Veröffentl.: 19.01.2016
ISBN/EAN: 9781119077237
Sprache: englisch
Anzahl Seiten: 800

DRM-geschütztes eBook, Sie benötigen z.B. Adobe Digital Editions und eine Adobe ID zum Lesen.

Beschreibungen

<b>The complete guide to the productivity and performance enhancements in ASP.NET </b> <p><i>Beginning ASP.NET for Visual Studio 2015</i> is your ultimate guide to the latest upgrade of this historically popular framework. Fully updated to align with the vNext release, this new edition walks you through the new tools and features that make your workflow smoother and your applications stronger. You'll get up to speed on the productivity and performance improvements, and learn how Microsoft has committed itself to more continuous innovation by increasing its release cadence for all products and services going forward. Coverage includes Async-aware debugging, ADO.NET idle connection resiliency, managed return value inspection, ASP.NET app suspension, on-demand large object heap compaction, multi-core JIT and more.</p> <p>The news of an off-cycle update to ASP.NET came as a surprise, but its announcement garnered cheers at the 2014 Microsoft BUILD conference. This guide shows you what all the fuss is about, and how Microsoft overhauled the latest ASP.NET release.</p> <ul> <li>Get acquainted with the new developer productivity features</li> <li>Master the new tools that build better applications</li> <li>Discover what's new in Windows Store app development</li> <li>Learn how Microsoft fixed the issues that kept you from v5</li> </ul> <p>Over 38 million websites are currently using ASP.NET, and the new upgrade is already leading to increased adoption. Programmers need to master v6 to remain relevant as web development moves forward. <i>Beginning ASP.NET for Visual Studio 2015</i> walks you through the details, and shows you what you need to know so you can get up and running quickly.</p>
<p>INTRODUCTION xxi</p> <p><b>CHAPTER 1: GETTING STARTED WITH ASP.NET 6.0 1</b></p> <p>An Introduction to ASP.NET vNext 2</p> <p>Hypertext Transfer Protocol (HTTP) 2</p> <p>Microsoft Internet Information Services 5</p> <p>HTML 5 5</p> <p>HTML Markup 5</p> <p>Attributes in HTML 7</p> <p>HTML Example 8</p> <p>ASP.NET Web Forms 10</p> <p>ViewState 10</p> <p>ASP.NET Web Forms Events and Page Lifecycle 11</p> <p>Control Library 13</p> <p>ASP.NET MVC 15</p> <p>Testability 16</p> <p>Full Control over Output 17</p> <p>Web Forms and MVC Similarities 17</p> <p>Choosing the Best Approach 17</p> <p>Using Visual Studio 2015 18</p> <p>Versions 18</p> <p>Downloading and Installing 19</p> <p>The Sample Application 23</p> <p>Summary 24</p> <p><b>CHAPTER 2: BUILDING AN INITIAL ASP.NET APPLICATION 27</b></p> <p>Creating Websites with Visual Studio 2015 28</p> <p>Available Project Types 28</p> <p>Web Site Project–Based Approach 28</p> <p>Web Application Project 29</p> <p>Creating a New Site 30</p> <p>While Creating a Project 30</p> <p>Empty Template 34</p> <p>Web Forms Template 35</p> <p>MVC Template 36</p> <p>Web API Template 36</p> <p>Single Page Application Template 37</p> <p>Azure Mobile Service Template 38</p> <p>Working with Files in Your Application 38</p> <p>File Types of an ASP.NET MVC Application 38</p> <p>File System Structure of an ASP.NET MVC Application 41</p> <p>File Types of an ASP.NET Web Forms Application 43</p> <p>MVC and Web Form File Differences 46</p> <p>Creating the Sample Application 47</p> <p>Summary 49</p> <p><b>CHAPTER 3: DESIGNING YOUR WEB PAGES 51</b></p> <p>HTML and CSS 52</p> <p>Why Use Both HTML and CSS? 52</p> <p>An Introduction to CSS 54</p> <p>More CSS 58</p> <p>Selectors 58</p> <p>Properties 61</p> <p>Precedence in Styles 65</p> <p>The Style Sheet 67</p> <p>Adding CSS to Your Pages 68</p> <p>Creating Embedded and Inline Style Sheets 71</p> <p>Applying Styles 72</p> <p>Managing Styles 78</p> <p>Summary 84</p> <p><b>CHAPTER 4: PROGRAMMING IN C# AND VB.NET 87</b></p> <p>Introduction to Programming 87</p> <p>Data Types and Variables 88</p> <p>Defi ning a Variable 88</p> <p>Operators 91</p> <p>Converting and Casting Data Types 93</p> <p>Converting Data Types 93</p> <p>Casting Data Types 96</p> <p>Using Arrays and Collections 97</p> <p>Using Arrays 97</p> <p>Using Collections 99</p> <p>Decision-Making Operations 101</p> <p>Comparison Operators 102</p> <p>Logical Operators 103</p> <p>If Statement 104</p> <p>Switch/Select Case Statement 106</p> <p>Loops 106</p> <p>For Loop 106</p> <p>Foreach/For Each Loops 108</p> <p>While Loop 109</p> <p>Exiting Loops 110</p> <p>Organizing Code 110</p> <p>Methods: Functions and Subroutines 110</p> <p>Writing Comments and Documentation 112</p> <p>Object-Oriented Programming Basics 114</p> <p>Important OO Terminology 115</p> <p>Classes 115</p> <p>Fields 116</p> <p>Properties 117</p> <p>Methods 120</p> <p>Constructors 120</p> <p>Inheritance 121</p> <p>Events 123</p> <p>Summary 125</p> <p><b>CHAPTER 5: ASP.NET WEB FORM SERVER CONTROLS 129</b></p> <p>Introduction to Server Controls 129</p> <p>Defining Controls in Your Pages 130</p> <p>Types of Controls 137</p> <p>Standard Controls 138</p> <p>HTML Controls 143</p> <p>Data Controls 144</p> <p>Validation Controls 144</p> <p>Navigation Controls 145</p> <p>Login Controls 145</p> <p>AJAX Extensions 146</p> <p>Other Control Sets 146</p> <p>The ASP.NET State Engine 147</p> <p>How the State Engine Works 148</p> <p>Summary 157</p> <p><b>CHAPTER 6: ASP.NET MVC HELPERS AND EXTENSIONS 161</b></p> <p>Why MVC Has Fewer Controls Than Web Forms 162</p> <p>A Different Approach 162</p> <p>Razor 166</p> <p>Controller 170</p> <p>Routing 172</p> <p>HTTP Verbs and Attributes 174</p> <p>Form-Building Helpers 175</p> <p>Form Extensions 175</p> <p>Editor and EditorFor 177</p> <p>Model Binding 177</p> <p>Summary 194</p> <p><b>CHAPTER 7: CREATING CONSISTENT-LOOKING WEBSITES 197</b></p> <p>Consistent Page Layout with Master Pages 198</p> <p>Creating and Using Master Pages in ASP.NET Web Forms 198</p> <p>Creating a Content Page in ASP.NET Web Forms 208</p> <p>Creating Layouts in ASP.NET MVC 212</p> <p>Creating a Content View in ASP.NET MVC 215</p> <p>Using a Centralized Base Page 219</p> <p>Summary 225</p> <p><b>CHAPTER 8: NAVIGATION 229</b></p> <p>Different Ways to Move around Your Site 230</p> <p>Understanding Absolute and Relative URLs 230</p> <p>Understanding Default Documents 234</p> <p>Friendly URLs 234</p> <p>Using the ASP.NET Web Forms Navigation Controls 236</p> <p>Using the Menu Control 240</p> <p>Navigating in ASP.NET MVC 248</p> <p>Routing 248</p> <p>Default Configuration and Route 249</p> <p>Creating a Navigational Structure 252</p> <p>Programmatic Redirection 255</p> <p>Programmatically Redirecting the Client to a Different Page 255</p> <p>Server-Side Redirects 258</p> <p>Practical Tips on Navigation 262</p> <p>Summary 263</p> <p><b>CHAPTER 9: DISPLAYING AND UPDATING DATA 267</b></p> <p>Working with SQL Server Express 268</p> <p>Installation 269</p> <p>SQL Server Management Studio 276</p> <p>Connecting in Visual Studio 282</p> <p>Entity Framework Approach to Data Access 285</p> <p>Data First 285</p> <p>Code First 286</p> <p>Selecting Data from the Database 295</p> <p>Data Controls in Web Forms 297</p> <p>Details View 297</p> <p>Web Form GridView 303</p> <p>Data Display in MVC 310</p> <p>List Display in MVC 311</p> <p>Details Views 314</p> <p>Summary 318</p> <p><b>CHAPTER 10: WORKING WITH DATA—ADVANCED TOPICS 323</b></p> <p>Sorting and Pagination 324</p> <p>Sorting and Pagination in Web Form Server Controls 324</p> <p>Sorting and Pagination in MVC Lists 330</p> <p>Updating and/or Inserting Data 339</p> <p>A Non-Code First Approach to Database Access 347</p> <p>Using SQL Queries and Stored Procedures 350</p> <p>Caching 358</p> <p>Different Ways to Cache Data in ASP.NET Applications 358</p> <p>Common Pitfalls with Caching Data 362</p> <p>Summary 363</p> <p><b>CHAPTER 11: USER CONTROLS AND PARTIAL VIEWS 367</b></p> <p>Introduction to User Controls 368</p> <p>Creating User Controls 369</p> <p>Adding User Controls 373</p> <p>Sitewide Registration of a User Control 376</p> <p>Managing the IDs of Any Controls 379</p> <p>Adding Logic to Your User Controls 381</p> <p>Using Partial Views 387</p> <p>Adding a Partial View 389</p> <p>Managing the Controller for a Partial View 393</p> <p>Templates 400</p> <p>Summary 408</p> <p><b>CHAPTER 12: VALIDATING USER INPUT 413</b></p> <p>Gathering Data from the User 414</p> <p>Validating User Input in Web Forms 415</p> <p>Understanding Request Validation 424</p> <p>Validating User Input in MVC 426</p> <p>Model Attribution 426</p> <p>Client-Side Validation 434</p> <p>Request Validation in ASP.NET MVC 443</p> <p>Validation Tips 444</p> <p>Summary 445</p> <p><b>CHAPTER 13: ASP.NET AJAX 449</b></p> <p>Introducing the Concept of AJAX 450</p> <p>F12 Developer Tools 451</p> <p>Using ASP.NET AJAX in Web Forms 457</p> <p>The Initial AJAX Experience 457</p> <p>Enhancing the AJAX Experience 466</p> <p>Using AJAX in MVC 469</p> <p>Using Web Services in AJAX Websites 483</p> <p>jQuery in AJAX 489</p> <p>Practical AJAX Tips 495</p> <p>Summary 496</p> <p><b>CHAPTER 14: jQUERY 499</b></p> <p>An Introduction to jQuery 499</p> <p>Early JavaScript 500</p> <p>jQuery’s Role 500</p> <p>Including the jQuery Library 503</p> <p>Bundles 506</p> <p>jQuery Syntax 512</p> <p>jQuery Core 513</p> <p>Working with the jQuery Utility Methods 514</p> <p>Selecting Items Using jQuery 516</p> <p>Modifying the DOM with jQuery 519</p> <p>Changing Appearance with jQuery 519</p> <p>Handling Events 523</p> <p>Debugging jQuery 532</p> <p>Practical Tips on jQuery 536</p> <p>Summary 537</p> <p><b>CHAPTER 15: SECURITY IN YOUR ASP.NET WEBSITE 541</b></p> <p>Introducing Security 542</p> <p>Identity: Who Are You? 542</p> <p>Authentication: How Can Users Prove Who They Are? 542</p> <p>Authorization: What Are You Allowed to Do? 543</p> <p>Logging in with ASP.NET 543</p> <p>Confi guring Your Web Application for Security 547</p> <p>Working with Users within Your Application 558</p> <p>Roles 566</p> <p>Configuring Your Application to Work with Roles 567</p> <p>Programmatically Checking Roles 572</p> <p>Practical Security Tips 576</p> <p>Summary 576</p> <p><b>CHAPTER 16: PERSONALIZING WEBSITES 581</b></p> <p>Understanding the Profile 582</p> <p>Creating the Profile 582</p> <p>Using the Profile 590</p> <p>Practical Personalization Tips 602</p> <p>Summary 603</p> <p><b>CHAPTER 17: EXCEPTION HANDLING, DEBUGGING, AND TRACING 605</b></p> <p>Error Handling 606</p> <p>Different Types of Errors 606</p> <p>Syntax Errors 606</p> <p>Logic Errors 607</p> <p>Runtime Errors 609</p> <p>Catching and Handling Exceptions 612</p> <p>Global Error Handling and Custom Error Pages 621</p> <p>Error Handling in a Controller 627</p> <p>The Basics of Debugging 629</p> <p>Tools Support for Debugging 629</p> <p>Moving Around in Debugged Code 629</p> <p>Debugging Windows 631</p> <p>Other Windows 634</p> <p>Debugging Client-Side Script 638</p> <p>Tracing Your ASP.NET Web Pages 647</p> <p>Adding Your Own Information to the Trace 650</p> <p>Tracing and Performance 654</p> <p>Logging 654</p> <p>Downloading, Installing, and Configuring a Logger 655</p> <p>Summary 658</p> <p><b>CHAPTER 18: WORKING WITH SOURCE CONTROL 661</b></p> <p>Introducing Team Foundation Services 661</p> <p>Why Use Source Control 662</p> <p>Setting Up a Visual Studio Online Account 662</p> <p>Checking Code In and Out 669</p> <p>Undoing Changes 670</p> <p>Shelvesets 672</p> <p>Getting a Specific Version from the Server 672</p> <p>Seeing Changed Items in Solution Explorer 675</p> <p>Looking at History and Comparing Versions 675</p> <p>Labeling 676</p> <p>Interacting with a Team 677</p> <p>Changing Default Source Control Behavior in Visual Studio 677</p> <p>Branching and Merging 678</p> <p>Summary 681</p> <p><b>CHAPTER 19: DEPLOYING YOUR WEBSITE 683</b></p> <p>Preparing Your Website for Deployment 684</p> <p>Avoiding Hard-Coded Settings 684</p> <p>The Web.config File 685</p> <p>Expression Syntax 685</p> <p>The Web Configuration Manager Class 687</p> <p>Preparing for Deployment 691</p> <p>Microsoft Azure 691</p> <p>Publishing Your Site 695</p> <p>Introducing Web.config Transformations 706</p> <p>Moving Data to a Remote Server 713</p> <p>Smoke Testing Your Application 720</p> <p>Going Forward 722</p> <p>Summary 722</p> <p>Appendix: answers to exercises 725</p> <p>Index 735</p>
<p><b>About the author</b> <p><b>William Penberthy</b> has specialized in the Microsoft software development stack since the initial deployment of .NET, performing client, service, and web development in C# and VB.NET. He has directly participated in the development of over 135 different applications, ranging from record retention management software, to e-Commerce storefronts, to geographic information systems, to point-of-sale systems and many applications in between.
<p><b>Learn ASP.NET for Visual Studio 2015 through expert, step-by-step instruction</b> <p>ASP.NET allows programmers to build more dynamic websites, web applications, and web services, and with the latest update, it's never been a better time to learn. The newest versions of ASP.NET and Visual Studio help developers boost productivity, create more robust applications, and push the boundaries of technology even further. This book provides step-by-step expert instruction for all aspects of ASP.NET development, from the very basics of the framework to advanced security and data handling topics. Clear examples illustrate important techniques, and comprehensive start-to-finish coverage provides a valuable, all-in-one reference for those looking to learn, and those who just need to get up to speed. <p><i>Beginning ASP.NET for Visual Studio 2015:</i> <ul> <li> Walks through the basics of ASP.NET and Visual Studio 2015 with a sample application build</li> <li> Demonstrates web page design using HTML and CSS, including effective navigation, user controls, consistency, and more</li> <li> Explains C# and VB.NET programming from the very beginning, including code organization, the basics of object-orientation, and important terminology</li> <li> Introduces ASP.NET Web Forms server controls and MVC helpers and extensions</li> <li> Explains ASP.NET AJAX, jQuery<sup>®</sup>, and advanced data handling with ADO.NET and Entity Framework</li> <li> Provides guidance on security, debugging, deployment, troubleshooting, and more</li> </ul> <p>Visit us at wrox.com where you have access to free code samples, Programmer to Programmer forums, and discussions on the latest happenings in the industry from around the world. <p><b>Wrox Beginning guides</b> 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.

Diese Produkte könnten Sie auch interessieren:

Facebook Marketing
Facebook Marketing
von: Chris Treadaway, Mari Smith
PDF ebook
23,99 €
Ajax For Dummies
Ajax For Dummies
von: Steve Holzner
PDF ebook
22,99 €
The Web's Awake
The Web's Awake
von: Philip D. Tetlow
PDF ebook
69,99 €