Introduction and Overview
This series of tutorials guides you through the steps required to create an ASP.NET Web Forms application using Visual Studio Express 2012 for Web and ASP.NET 4.5.
The application you'll create is named Wingtip Toys. It's a simplified example of a store front web site that sells items online. This tutorial series highlights several of the new features available in ASP.NET 4.5.
Comments are welcome, and we'll make every effort to update this tutorial series based on your suggestions.
Download completed project
You can download a C# or Visual Basic project that contains the completed tutorial.
- Getting Started with ASP.NET 4.5 Web Forms - Wingtip Toys (C#)
- ASP.NET 4.5 Web Forms Tutorial Series (Visual Basic) by James Chaney
The intended audience of this tutorial series is experienced developers who are new to ASP.NET Web Forms. A developer interested in this tutorial series should have the following skills:
- Familiar with an object oriented programming language
- Familiar with relational database concepts
- Familiar with n-tier architecture concepts
The ASP.NET Web Form features presented in this series include:
- The Web Application Project (not Web Site Project)
- Web Forms
- Master Pages, Configuration
- Entity Framework Code First, LocalDB
- Request Validation
- Strongly Typed Data Controls, Model Binding, Data Annotations, and Value Providers
- OAuth and OpenID
- ASP.NET Membership, Configuration and Authorization
- Unobtrusive Validation
Application Scenarios and Tasks
Tasks demonstrated in this first series include:
- Creating, reviewing and running the new project
- Creating the database structure
- Initializing and seeding the database
- Customizing the UI using styles, graphics and a master page
- Adding pages and navigation
- Displaying menu details and product data
- Creating a shopping cart
- Adding OpenID support
- Adding a payment method
- Including an administrator role and a user to the application
- Restricting access to specific pages and folder
- Uploading a file to the web application
- Implementing input validation
- Registering routes for the web application
- Implementing error handling and error logging
If you are new to ASP.NET Web Forms but have familiarity with programming concepts, you have the right tutorial. If you are already familiar with ASP.NET Web Forms, you can benefit from this tutorial series by the new features available in ASP.NET 4.5. If you are unfamiliar with programming concepts and ASP.NET Web Forms, see Getting Started on the ASP.NET Web site.
The following screen shots provide a quick view of the ASP.NET Web forms application that you will create in this tutorial series. When you run the application from Visual Studio Express 2012 for Web, you will see the following web Home page.
You can register as a new user, or log in as an existing user. Navigation is provided at the top for each product category. Each time the Home page is reached, one of the available products from the database will be displayed.
By selecting the Products link, you will be able to see a list of all available products.
You can also see individual product details by selecting any of the listed products.
As a user, you can register and log in using the default functionality of the Web Forms template. Also, this tutorial explains how to login using an existing gmail account.
Once you have logged in, you can add products to the shopping cart and checkout with PayPal.
PayPal will confirm your account, order, and payment information.
After returning from PayPal, you can review and complete your order.
Before you start, make sure that you have the following software installed on your computer:
- Microsoft Visual Studio 2012 or Microsoft Visual Studio Express 2012 for Web. The .NET Framework is installed automatically.
This tutorial series uses Microsoft Visual Studio Express 2012 for Web. You can use either Microsoft Visual Studio Express 2012 for Web or Microsoft Visual Studio 2012 to complete this tutorial series.
Microsoft Visual Studio 2012 and Microsoft Visual Studio Express 2012 for Web will often be referred to as Visual Studio throughout this tutorial series.
If you already have a Visual Studio version installed, the installation process will install Visual Studio 2012 or Microsoft Visual Studio Express 2012 for Web next to the existing version. Sites that you created in earlier versions can be opened in Visual Studio 2012 and continue to open in previous versions.
This walkthrough assumes that you selected the Web Development collection of settings the first time that you started Visual Studio. For more information, see How to: Select Web Development Environment Settings.
Download the Sample Application
After installing the prerequisites, you are ready to begin creating the new Web project that is presented in this tutorial series. If you would like to run the sample application that this tutorial series creates, you can download it from the MSDN Samples site. This download contains the following:
- The sample application in the WingtipToys folder.
- The resources used to create the sample application in the WingtipToys-Assets folder in the WingtipToys folder.
Getting Started with ASP.NET Web Forms 4.5
The download is a .zip file. To see the completed project that this tutorial series creates, find and select the C# folder in the .zip file. Save the C# folder to the folder you use to work with Visual Studio 2012 projects. By default this is the following folder:
C:\Users\<username>\Documents\Visual Studio 11\Projects
Rename the C# folder to WingtipToys.
If you already have a folder named WingtipToys in your Projects folder, temporarily rename that existing folder before renaming the C# folder to WingtipToys.
To run the completed project, open the WingtipToys folder and double-click the WingtipToys.sln file. Visual Studio 2012 will open the project. Next, right-click the Default.aspx file in the Solution Explorer window and click View In Browser from the right-click menu.
Tutorial Support and Comments
Use the Q AND A section included with the Getting Started with ASP.NET Web Forms 4.5 sample for any questions or comments.
Comments on this tutorial series are welcome, and when this tutorial series is updated every effort will be made to take into account corrections or suggestions for improvements that are provided in the tutorial comments.
When an error happens during development, or if the Web site does not run correctly, the error messages may give complex clues to the source of the problem or might not explain how to fix it. To help you with some common problem scenarios, you can also use the ASP.NET forums or the Q AND A section included with the Getting Started with ASP.NET Web Forms 4.5 sample. If you get an error message or something doesn't work as you go through the tutorials, be sure to check the above locations.