Introduction
It was estimated in June 2015 that 45 percent of the world's population has accessed the Internet. That's over 3 billion users, and the number is growing every day. This is a vast, connected market that can reach any content you decide to make available, be it a simple web page or a complex web application.
There are a lot of ways that you can make a simple web page available online. There are a lot fewer approaches when you are trying to build a web application. One of these web application technologies is ASP.NET from Microsoft.
ASP.NET is a framework that supports the building of robust and performant web applications. Think of it as the structural support for a car. You can add a couple of different body designs on top of this structure: ASP.NET Web Forms and ASP.NET MVC. These two approaches both rest on ASP.NET and depend on common functionality that is made available through ASP.NET.
Visual Studio 2015 is the primary tool used when creating and maintaining ASP.NET web applications. It will help you easily work with every aspect of your web application, from the look and feel all the way through to deployment of your applicationand skipping none of the steps in between. In addition, because Microsoft is committed to supporting ASP.NET developers, it is available in a fully functional free version!
This book is an exploration of both ASP.NET Web Forms and MVC. As part of this exploration you will become familiar with all of the various components of a functional web application, creating a sample application as you go through the different parts of the development process. You will learn how the two frameworks do things, with some approaches being very similar while others are completely different. No matter the style of approach, however, it is always clear that they both rest on the same framework.
Who This Book Is For
This book is designed for anyone who wants to build robust, performant, and scalable web applications. Although the development tools run in Microsoft Windows, you are free to deploy the application onto virtually any current operating system; therefore, even organizations that don't have Microsoft servers have the capability to now run ASP.NET web applications.
If you are new to software development you should have no problem following along, as the book has been structured with you in mind. Those of you who are experienced developers but new to web development will also find many different areas of interest and use, especially if C# is not your current programming language.
Lastly, experienced ASP.NET developers should also find many topics of interest, especially if your experience is mainly related to either Web Forms or MVC, but not both. This book will give you experience in both approaches as well as demonstrate how to integrate the two approaches into a single application.
What This Book Covers
This book teaches you how to build a fully functional web application. You will have the opportunity to build a complete site using both ASP.NET MVC and ASP.NET Web Forms approaches so that you can develop an understanding of, and build a comfort level with, the complete ASP.NET set of functionality. Each chapter takes you a step further along the development process:
- Chapter 1: Getting Started with ASP.NET 6.0You will get an introduction to ASP.NET as a general framework and specifically with Web Forms and MVC. You will also download and install Visual Studio 2015.
- Chapter 2: Building an Initial ASP.NET ApplicationIn this chapter you create the initial project, including configuring it to support both Web Forms and MVC.
- Chapter 3: Designing Your Web PagesThis chapter introduces you to HTML and CSS so that you can build attractive and understandable web sites.
- Chapter 4: Programming in C# and VB.NETASP.NET is a developmental framework with which you can use different programming languages, including C# and VB.NET. This chapter provides an introduction to using them.
- Chapter 5: ASP.NET Web Form Server ControlsASP.NET Web Forms offers many different forms of built-in functionality that it provides as server controls. These controls enable you to create complex and feature-rich web sites with very little code. This chapter covers the most common controls.
- Chapter 6: ASP.NET MVC Helpers and ExtensionsWhereas ASP.NET Web Forms have server controls to provide features, ASP.NET MVC offers a different type of support through the use of helpers and extensions. This chapter describes that different support.
- Chapter 7: Creating Consistent-Looking WebsitesYou will learn how ASP.NET enables you to use master pages and layout pages to create a consistent look and feel throughout your web application.
- Chapter 8: NavigationIn this chapter you learn the different ways to create menus and other navigation structures. You also look at the different types of links that you can build in both Web Forms and MVC.
- Chapter 9: Displaying and Updating DataWhen you want to use a database with ASP.NET, there are no better options than SQL Server. In this chapter, you install SQL Server, create your initial database schema, and incorporate the creation and display of data into your application.
- Chapter 10: Working with DataAdvanced TopicsAdvanced topics include pagination, sorting, and using advanced database items such as stored procedures to retrieve special sets of information from the database. You will also learn how you can speed up responsiveness by storing data in various places.
- Chapter 11: User Controls and Partial ViewsASP.NET offers server controls and helpers to provide built-in functionality. Learn how to create your own items to provide common functionality across multiple pages.
- Chapter 12: Validating User InputA large part of your site's functionality is defined by the data that users input into your application. This chapter shows you how to accept, validate, and process user input using tools for both Web Forms and MVC.
- Chapter 13: ASP.NET AJAXAJAX is a technology that enables you to update parts of your page without making a full-page call to the server. Learn how to do this for both Web Forms and MVC.
- Chapter 14: jQueryEverything covered up until this point has been based on doing work on the server. In this chapter you are introduced to using jQuery for work on the client, without having to call back to the server.
- Chapter 15: Security in Your ASP.NET WebsiteThis chapter adds the concept of a user, demonstrating how you can identify your visitors by requiring them to log in to your application.
- Chapter 16: Personalizing WebsitesHere you will learn how to customize the user information you are using to get the information needed to ensure that users feel welcome at your site. Capturing information about the user's visit also helps you better understand what they want when they visit your site.
- Chapter 17: Exception Handling, Debugging, and TracingUnfortunately, it's very difficult to write code that is totally problem-free. Learn how to manage these problems, including finding and fixing them as well as ensuring that when they happen, users are given the relevant information as to why their actions were not successful.
- Chapter 18: Working with Source ControlWorking within a team is an important aspect of being a professional developer. Source control provides a way for you to share code among users. It also manages backing up your source code with saved versions.
Next page