- ASP.NET 4.5
- Getting Started with EF
- 1. Entity Framework 4.0 and ASP.NET – Getting Started Part 1
- 2. Entity Framework 4.0 and ASP.NET – Getting Started Part 2
- 3. Entity Framework 4.0 and ASP.NET – Getting Started Part 3
- 4. Entity Framework 4.0 and ASP.NET – Getting Started Part 4
- 5. Entity Framework 4.0 and ASP.NET – Getting Started Part 5
- 6. Entity Framework 4.0 and ASP.NET – Getting Started Part 6
- 7. Entity Framework 4.0 and ASP.NET – Getting Started Part 7
- 8. Entity Framework 4.0 and ASP.NET – Getting Started Part 8
- Continuing with EF
- 1. Entity Framework 4.0 and the ObjectDataSource Control, Part 1: Getting Started
- 2. Entity Framework 4.0 and the ObjectDataSource Control, Part 2: Adding a Business Logic Layer and Unit Tests
- 3. Entity Framework 4.0 and the ObjectDataSource Control, Part 3: Sorting and Filtering
- 4. Handling Concurrency with the Entity Framework 4.0 in an ASP.NET Web Application
- 5. Maximizing Performance with the Entity Framework 4.0 in an ASP.NET Web Application
- 6. What's New in the Entity Framework 4.0
- ASP.NET AJAX
- 1. Understanding Partial Page Updates with ASP.NET AJAX
- 2. Understanding ASP.NET AJAX UpdatePanel Triggers
- 3. Understanding ASP.NET AJAX Authentication and Profile Application Services
- 4. Understanding ASP.NET AJAX Localization
- 5. Understanding ASP.NET AJAX Web Services
- 6. Understanding ASP.NET AJAX Debugging Capabilities
- Ajax Control Toolkit
- Getting Started
- 1. Get Started with the AJAX Control Toolkit (C#)
- 2. Using AJAX Control Toolkit Controls and Control Extenders (C#)
- 3. Creating a Custom AJAX Control Toolkit Control Extender (C#)
- 4. Get Started with the AJAX Control Toolkit (VB)
- 5. Using AJAX Control Toolkit Controls and Control Extenders (VB)
- 6. Creating a Custom AJAX Control Toolkit Control Extender (VB)
- Accordion
- Animation
- 1. Adding Animation to a Control (C#)
- 2. Executing Several Animations at Same Time (C#)
- 3. Executing Several Animations after Each Other (C#)
- 4. Animation Depending On a Condition (C#)
- 5. Picking One Animation Out Of a List (C#)
- 6. Animating in Response To User Interaction (C#)
- 7. Disabling Actions during Animation (C#)
- 8. Triggering an Animation in another Control (C#)
- 9. Modifying Animations From Server Side (C#)
- 10. Executing Animations Using Client-Side Code (C#)
- 11. Changing an Animation Using Client-Side Code (C#)
- 12. Animating an UpdatePanel Control (C#)
- 13. Dynamically Controlling UpdatePanel Animations (C#)
- 14. Adding Animation to a Control (VB)
- 15. Executing Several Animations at Same Time (VB)
- 16. Executing Several Animations after Each Other (VB)
- 17. Animation Depending On a Condition (VB)
- 18. Picking One Animation Out Of a List (VB)
- 19. Animating in Response To User Interaction (VB)
- 20. Disabling Actions during Animation (VB)
- 21. Triggering an Animation in another Control (VB)
- 22. Modifying Animations From Server Side (VB)
- 23. Executing Animations Using Client-Side Code (VB)
- 24. Changing an Animation Using Client-Side Code (VB)
- 25. Animating an UpdatePanel Control (VB)
- 26. Dynamically Controlling UpdatePanel Animations (VB)
- CascadingDropdown
- 1. Filling a List Using CascadingDropDown (C#)
- 2. Using CascadingDropDown with a Database (C#)
- 3. Presetting List Entries with CascadingDropDown (C#)
- 4. Using Auto-Postback with CascadingDropDown (C#)
- 5. Filling a List Using CascadingDropDown (VB)
- 6. Using CascadingDropDown with a Database (VB)
- 7. Presetting List Entries with CascadingDropDown (VB)
- 8. Using Auto-Postback with CascadingDropDown (VB)
- CollapsiblePanel
- ColorPicker
- ComboBox
- ConfirmButton
- DropShadow
- DynamicPopulate
- 1. Dynamically Populating a Control (C#)
- 2. Dynamically Populating a Control Using JavaScript Code (C#)
- 3. Using DynamicPopulate with a User Control And JavaScript (C#)
- 4. Dynamically Populating a Control (VB)
- 5. Dynamically Populating a Control Using JavaScript Code (VB)
- 6. Using DynamicPopulate with a User Control And JavaScript (VB)
- FilteredTextBox
- HoverMenu
- HTMLEditor
- ModalPopup
- 1. Launching a Modal Popup Window from Server Code (C#)
- 2. Using ModalPopup with a Repeater Control (C#)
- 3. Handling Postbacks from a ModalPopup (C#)
- 4. Positioning a ModalPopup (C#)
- 5. Launching a Modal Popup Window from Server Code (VB)
- 6. Using ModalPopup with a Repeater Control (VB)
- 7. Handling Postbacks from a ModalPopup (VB)
- 8. Positioning a ModalPopup (VB)
- MutuallyExclusiveCheckbox
- NoBot
- NumericUpDown
- PasswordStrength
- Popup
- 1. Using Multiple Popup Controls (C#)
- 2. Handling Postbacks from A Popup Control With an UpdatePanel (C#)
- 3. Handling Postbacks from A Popup Control Without an UpdatePanel (C#)
- 4. Using Multiple Popup Controls (VB)
- 5. Handling Postbacks from A Popup Control With an UpdatePanel (VB)
- 6. Handling Postbacks from A Popup Control Without an UpdatePanel (VB)
- Rating
- ReorderList
- Slider
- TextBoxWatermark
- Getting Started
- Data Access
- ASP.NET Data Access Content Map
- Model Binding
- Introduction
- Basic Reporting
- 1. Displaying Data With the ObjectDataSource (C#)
- 2. Declarative Parameters (C#)
- 3. Programmatically Setting the ObjectDataSource's Parameter Values (C#)
- 4. Displaying Data With the ObjectDataSource (VB)
- 5. Declarative Parameters (VB)
- 6. Programmatically Setting the ObjectDataSource's Parameter Values (VB)
- Master/Detail
- 1. Master/Detail Filtering With a DropDownList (C#)
- 2. Master/Detail Filtering With Two DropDownLists (C#)
- 3. Master/Detail Filtering Across Two Pages (C#)
- 4. Master/Detail Using a Selectable Master GridView with a Details DetailView (C#)
- 5. Master/Detail Filtering With a DropDownList (VB)
- 6. Master/Detail Filtering With Two DropDownLists (VB)
- 7. Master/Detail Filtering Across Two Pages (VB)
- 8. Master/Detail Using a Selectable Master GridView with a Details DetailView (VB)
- Custom Formatting
- 1. Custom Formatting Based Upon Data (C#)
- 2. Using TemplateFields in the GridView Control (C#)
- 3. Using TemplateFields in the DetailsView Control (C#)
- 4. FormView's Templates (C#)
- 5. Displaying Summary Information in the GridView's Footer (C#)
- 6. Custom Formatting Based Upon Data (VB)
- 7. Using TemplateFields in the GridView Control (VB)
- 8. Using TemplateFields in the DetailsView Control (VB)
- 9. FormView's Templates (VB)
- 10. Displaying Summary Information in the GridView's Footer (VB)
- Editing, Inserting, and Deleting Data
- 1. Overview of Inserting, Updating, and Deleting Data (C#)
- 2. Examining the Events Associated with Inserting, Updating, and Deleting (C#)
- 3. Handling BLL- and DAL-Level Exceptions in an ASP.NET Page (C#)
- 4. Adding Validation Controls to the Editing and Inserting Interfaces (C#)
- 5. Customizing the Data Modification Interface (C#)
- 6. Implementing Optimistic Concurrency (C#)
- 7. Adding Client-Side Confirmation When Deleting (C#)
- 8. Limiting Data Modification Functionality Based on the User (C#)
- 9. Overview of Inserting, Updating, and Deleting Data (VB)
- 10. Examining the Events Associated with Inserting, Updating, and Deleting (VB)
- 11. Handling BLL- and DAL-Level Exceptions in an ASP.NET Page (VB)
- 12. Adding Validation Controls to the Editing and Inserting Interfaces (VB)
- 13. Customizing the Data Modification Interface (VB)
- 14. Implementing Optimistic Concurrency (VB)
- 15. Adding Client-Side Confirmation When Deleting (VB)
- 16. Limiting Data Modification Functionality Based on the User (VB)
- Paging and Sorting
- 1. Paging and Sorting Report Data (C#)
- 2. Efficiently Paging Through Large Amounts of Data (C#)
- 3. Sorting Custom Paged Data (C#)
- 4. Creating a Customized Sorting User Interface (C#)
- 5. Paging and Sorting Report Data (VB)
- 6. Efficiently Paging Through Large Amounts of Data (VB)
- 7. Sorting Custom Paged Data (VB)
- 8. Creating a Customized Sorting User Interface (VB)
- Custom Button Actions
- Displaying Data with the DataList and Repeater
- 1. Displaying Data with the DataList and Repeater Controls (C#)
- 2. Formatting the DataList and Repeater Based Upon Data (C#)
- 3. Showing Multiple Records per Row with the DataList Control (C#)
- 4. Nested Data Web Controls (C#)
- 5. Displaying Data with the DataList and Repeater Controls (VB)
- 6. Formatting the DataList and Repeater Based Upon Data (VB)
- 7. Showing Multiple Records per Row with the DataList Control (VB)
- 8. Nested Data Web Controls (VB)
- Filtering Scenarios with the DataList and Repeater
- 1. Master/Detail Filtering With a DropDownList (C#)
- 2. Master/Detail Filtering Across Two Pages (C#)
- 3. Master/Detail Using a Bulleted List of Master Records with a Details DataList (C#)
- 4. Master/Detail Filtering With a DropDownList (VB)
- 5. Master/Detail Filtering Across Two Pages (VB)
- 6. Master/Detail Using a Bulleted List of Master Records with a Details DataList (VB)
- Editing and Deleting Data Through the DataList
- 1. Overview of Editing and Deleting Data in the DataList (C#)
- 2. Performing Batch Updates (C#)
- 3. Handling BLL- and DAL-Level Exceptions (C#)
- 4. Adding Validation Controls to the DataList's Editing Interface (C#)
- 5. Customizing the DataList's Editing Interface (C#)
- 6. Overview of Editing and Deleting Data in the DataList (VB)
- 7. Performing Batch Updates (VB)
- 8. Handling BLL- and DAL-Level Exceptions (VB)
- 9. Adding Validation Controls to the DataList's Editing Interface (VB)
- 10. Customizing the DataList's Editing Interface (VB)
- Paging and Sorting with the DataList and Repeater
- Custom Button Actions with the DataList and Repeater
- Accessing the Database Directly from an ASP.NET Page
- 1. Querying Data with the SqlDataSource Control (C#)
- 2. Using Parameterized Queries with the SqlDataSource (C#)
- 3. Inserting, Updating, and Deleting Data with the SqlDataSource (C#)
- 4. Implementing Optimistic Concurrency with the SqlDataSource (C#)
- 5. Querying Data with the SqlDataSource Control (VB)
- 6. Using Parameterized Queries with the SqlDataSource (VB)
- 7. Inserting, Updating, and Deleting Data with the SqlDataSource (VB)
- 8. Implementing Optimistic Concurrency with the SqlDataSource (VB)
- Enhancing the GridView
- 1. Adding a GridView Column of Radio Buttons (C#)
- 2. Adding a GridView Column of Checkboxes (C#)
- 3. Inserting a New Record from the GridView's Footer (C#)
- 4. Adding a GridView Column of Radio Buttons (VB)
- 5. Adding a GridView Column of Checkboxes (VB)
- 6. Inserting a New Record from the GridView's Footer (VB)
- Working with Binary Files
- 1. Uploading Files (C#)
- 2. Displaying Binary Data in the Data Web Controls (C#)
- 3. Including a File Upload Option When Adding a New Record (C#)
- 4. Updating and Deleting Existing Binary Data (C#)
- 5. Uploading Files (VB)
- 6. Displaying Binary Data in the Data Web Controls (VB)
- 7. Including a File Upload Option When Adding a New Record (VB)
- 8. Updating and Deleting Existing Binary Data (VB)
- Caching Data
- 1. Caching Data with the ObjectDataSource (C#)
- 2. Caching Data in the Architecture (C#)
- 3. Caching Data at Application Startup (C#)
- 4. Using SQL Cache Dependencies (C#)
- 5. Caching Data with the ObjectDataSource (VB)
- 6. Caching Data in the Architecture (VB)
- 7. Caching Data at Application Startup (VB)
- 8. Using SQL Cache Dependencies (VB)
- Database-Driven Site Maps
- Working with Batched Data
- Advanced Data Access Scenarios
- 1. Creating New Stored Procedures for the Typed DataSet's TableAdapters (C#)
- 2. Using Existing Stored Procedures for the Typed DataSet's TableAdapters (C#)
- 3. Updating the TableAdapter to Use JOINs (C#)
- 4. Adding Additional DataTable Columns (C#)
- 5. Working with Computed Columns (C#)
- 6. Configuring the Data Access Layer's Connection- and Command-Level Settings (C#)
- 7. Protecting Connection Strings and Other Configuration Information (C#)
- 8. Debugging Stored Procedures (C#)
- 9. Creating Stored Procedures and User-Defined Functions with Managed Code (C#)
- 10. Creating New Stored Procedures for the Typed DataSet's TableAdapters (VB)
- 11. Using Existing Stored Procedures for the Typed DataSet's TableAdapters (VB)
- 12. Updating the TableAdapter to Use JOINs (VB)
- 13. Adding Additional DataTable Columns (VB)
- 14. Working with Computed Columns (VB)
- 15. Configuring the Data Access Layer's Connection- and Command-Level Settings (VB)
- 16. Protecting Connection Strings and Other Configuration Information (VB)
- 17. Debugging Stored Procedures (VB)
- 18. Creating Stored Procedures and User-Defined Functions with Managed Code (VB)
- Master Pages
- 1. Creating a Site-Wide Layout Using Master Pages (C#)
- 2. Multiple ContentPlaceHolders and Default Content (C#)
- 3. Specifying the Title, Meta Tags, and Other HTML Headers in the Master Page (C#)
- 4. URLs in Master Pages (C#)
- 5. Control ID Naming in Content Pages (C#)
- 6. Interacting with the Master Page from the Content Page (C#)
- 7. Interacting with the Content Page from the Master Page (C#)
- 8. Master Pages and ASP.NET AJAX (C#)
- 9. Specifying the Master Page Programmatically (C#)
- 10. Nested Master Pages (C#)
- 11. Creating a Site-Wide Layout Using Master Pages (VB)
- 12. Multiple ContentPlaceHolders and Default Content (VB)
- 13. Specifying the Title, Meta Tags, and Other HTML Headers in the Master Page (VB)
- 14. URLs in Master Pages (VB)
- 15. Control ID Naming in Content Pages (VB)
- 16. Interacting with the Master Page from the Content Page (VB)
- 17. Interacting with the Content Page from the Master Page (VB)
- 18. Master Pages and ASP.NET AJAX (VB)
- 19. Specifying the Master Page Programmatically (VB)
- 20. Nested Master Pages (VB)
- Security
- Introduction
- Membership
- 1. Creating the Membership Schema in SQL Server (C#)
- 2. Creating User Accounts (C#)
- 3. Validating User Credentials Against the Membership User Store (C#)
- 4. User-Based Authorization (C#)
- 5. Storing Additional User Information (C#)
- 6. Creating the Membership Schema in SQL Server (VB)
- 7. Creating User Accounts (VB)
- 8. Validating User Credentials Against the Membership User Store (VB)
- 9. User-Based Authorization (VB)
- 10. Storing Additional User Information (VB)
- Roles
- Admin
- 1. Building an Interface to Select One User Account from Many (C#)
- 2. Recovering and Changing Passwords (C#)
- 3. Unlocking and Approving User Accounts (C#)
- 4. Building an Interface to Select One User Account from Many (VB)
- 5. Recovering and Changing Passwords (VB)
- 6. Unlocking and Approving User Accounts (VB)
- Deployment
- ASP.NET Web Deployment using Visual Studio 2012
- 1. Introduction
- 2. Preparing for Database Deployment
- 3. Web.config File Transformations
- 4. Project Properties
- 5. Deploying to Test
- 6. Setting Folder Permissions
- 7. Deploying to Production
- 8. Deploying a Code Update
- 9. Deploying a Database Update
- 10. Command Line Deployment
- 11. Deploying Extra Files
- 12. Troubleshooting
- ASP.NET Web Deployment with SQL Server Compact using Visual Studio
- 1. Visual Studio Web Deployment with SQL Server Compact - Introduction
- 2. Visual Studio Web Deployment with SQL Server Compact- Deploying SQL Server Compact Databases
- 3. Visual Studio Web Deployment with SQL Server Compact - Web.Config File Transformations
- 4. Visual Studio Web Deployment with SQL Server Compact - Configuring Project Properties
- 5. Visual Studio Web Deployment with SQL Server Compact - Deploying to IIS as a Test Environment
- 6. Visual Studio Web Deployment with SQL Server Compact - Setting Folder Permissions
- 7. Visual Studio Web Deployment with SQL Server Compact - Deploying to the Production Environment
- 8. Visual Studio Web Deployment with SQL Server Compact - Deploying a Code-Only Update
- 9. Visual Studio Web Deployment with SQL Server Compact - Deploying a Database Update
- 10. Visual Studio Web Deployment with SQL Server Compact - Migrating to SQL Server
- 11. Visual Studio Web Deployment with SQL Server Compact - Deploying a SQL Server Database Update
- 12. Visual Studio Web Deployment with SQL Server Compact - Troubleshooting
- Deploying Web Site Projects
- 1. ASP.NET Hosting Options (C#)
- 2. Determining What Files Need to Be Deployed (C#)
- 3. Deploying Your Site Using an FTP Client (C#)
- 4. Deploying Your Site Using Visual Studio (C#)
- 5. Common Configuration Differences Between Development and Production (C#)
- 6. Core Differences Between IIS and the ASP.NET Development Server (C#)
- 7. Deploying a Database (C#)
- 8. Configuring the Production Web Application to Use the Production Database (C#)
- 9. Configuring a Website that Uses Application Services (C#)
- 10. Strategies for Database Development and Deployment (C#)
- 11. Displaying a Custom Error Page (C#)
- 12. Processing Unhandled Exceptions (C#)
- 13. Logging Error Details with ASP.NET Health Monitoring (C#)
- 14. Logging Error Details with ELMAH (C#)
- 15. Precompiling Your Website (C#)
- 16. Users and Roles On Production Website (C#)
- 17. ASP.NET Hosting Options (VB)
- 18. Determining What Files Need to Be Deployed (VB)
- 19. Deploying Your Site Using an FTP Client (VB)
- 20. Deploying Your Site Using Visual Studio (VB)
- 21. Common Configuration Differences Between Development and Production (VB)
- 22. Core Differences Between IIS and the ASP.NET Development Server (VB)
- 23. Deploying a Database (VB)
- 24. Configuring the Production Web Application to Use the Production Database (VB)
- 25. Configuring a Website that Uses Application Services (VB)
- 26. Strategies for Database Development and Deployment (VB)
- 27. Displaying a Custom Error Page (VB)
- 28. Processing Unhandled Exceptions (VB)
- 29. Logging Error Details with ASP.NET Health Monitoring (VB)
- 30. Logging Error Details with ELMAH (VB)
- 31. Precompiling Your Website (VB)
- 32. Users and Roles On Production Website (VB)
- Enterprise Deployment Series Introduction: Deploying Web Applications in Enterprise Scenarios
- Enterprise Deployment Series 1: Web Deployment in the Enterprise
- 1. Web Deployment in the Enterprise
- 2. The Contact Manager Solution
- 3. Setting Up the Contact Manager Solution
- 4. Understanding the Project File
- 5. Understanding the Build Process
- 6. Building and Packaging Web Application Projects
- 7. Configuring Parameters for Web Package Deployment
- 8. Deploying Web Packages
- 9. Deploying Database Projects
- 10. Creating and Running a Deployment Command File
- 11. Manually Installing Web Packages
- Enterprise Deployment Series 2: Configuring Server Environments for Web Deployment
- 1. Configuring Server Environments for Web Deployment
- 2. Choosing the Right Approach to Web Deployment
- 3. Scenario: Configuring a Test Environment for Web Deployment
- 4. Scenario: Configuring a Staging Environment for Web Deployment
- 5. Scenario: Configuring a Production Environment for Web Deployment
- 6. Configuring a Web Server for Web Deploy Publishing (Remote Agent)
- 7. Configuring a Web Server for Web Deploy Publishing (Web Deploy Handler)
- 8. Configuring a Web Server for Web Deploy Publishing (Offline Deployment)
- 9. Configuring a Database Server for Web Deploy Publishing
- 10. Creating a Server Farm with the Web Farm Framework
- 11. Configuring Deployment Properties for a Target Environment
- Enterprise Deployment Series 3: Configuring Team Foundation Server for Web Deployment
- 1. Configuring Team Foundation Server for Web Deployment
- 2. Creating a Team Project in TFS
- 3. Adding Content to Source Control
- 4. Configuring a TFS Build Server for Web Deployment
- 5. Creating a Build Definition That Supports Deployment
- 6. Deploying a Specific Build
- 7. Configuring Permissions for Team Build Deployment
- Enterprise Deployment Series 4: Advanced Enterprise Web Deployment
- 1. Advanced Enterprise Web Deployment
- 2. Performing a "What If" Deployment
- 3. Customizing Database Deployments for Multiple Environments
- 4. Deploying Database Role Memberships to Test Environments
- 5. Deploying Membership Databases to Enterprise Environments
- 6. Excluding Files and Folders from Deployment
- 7. Taking Web Applications Offline with Web Deploy
- 8. Running Windows PowerShell Scripts from MSBuild Project Files
- 9. Troubleshooting the Packaging Process
- ASP.NET Web Deployment using Visual Studio 2012
- Moving to ASP.NET 2.0
- Tailspin Spyworks
- Hands On Labs
Create the Project
In this tutorial you will create, review, and run the default project in Visual Studio, which will allow you to become familiar with features of ASP.NET. Also, you will review the Visual Studio environment.
What you'll learn:
- How to create a new Web Forms project.
- The file structure of the Web Forms project.
- How to run the project in Visual Studio.
- The different features of the default Web forms application.
- Some basics about how to use the Visual Studio environment.
Creating the Project
- Open Visual Studio.
- Select New Project from the File menu in Visual Studio.
- Select the Templates > Visual C# > Web templates group on the left.
- Choose the ASP.NET Web Forms Application template in the center column.
- Name your project WingtipToys and choose the OK button.
The project will take a little time to create. When it’s ready, it shows the
Default.aspx page.
You can switch between Design view and Source view by selecting an option at the bottom of the center window. Design view displays ASP.NET Web pages, master pages, content pages, HTML pages, and user controls using a near-WYSIWYG view. Source view displays the HTML markup for your Web page, which you can edit.
Understanding the Project Type
ASP.NET Web Forms lets you build dynamic websites using a familiar drag-and-drop, event-driven model. A design surface and hundreds of controls and components let you rapidly build sophisticated, powerful UI-driven sites with data access. The Wingtip Toy Store is based on ASP.NET Web Forms, but many of the concepts you learn in this tutorial series are applicable to all of ASP.NET.
ASP.NET offers three development frameworks:
- ASP.NET Web Forms
The Web Forms framework targets developers who prefer declarative and control-based programming, such as Microsoft Windows Forms (WinForms) and WPF/XAML/Silverlight. It offers a WYSIWYG designer-driven development model, so it's popular with developers looking for a rapid application development (RAD) environment for web development. If you’re new to web programming and are familiar with the traditional Microsoft RAD client development tools (for example, for Visual Basic and Visual C#), you can quickly build a web application without having experience in HTML and JavaScript. - ASP.NET MVC
ASP.NET MVC targets developers who are interested in patterns and principles like test-driven development, separation of concerns, inversion of control (IoC), and dependency injection (DI). This framework encourages separating the business logic layer of a web application from its presentation layer. - ASP.NET Web Pages
ASP.NET Web Pages targets developers who want a simple web development story, along the lines of PHP. In the Web Pages model, you create HTML pages and then add server-based code to the page in order to dynamically control how that markup is rendered. Web Pages is specifically designed to be a lightweight framework, and it's the easiest entry point into ASP.NET for people who know HTML but might not have broad programming experience — for example, students or hobbyists. It's also a good way for web developers who know PHP or similar frameworks to start using ASP.NET.
Reviewing the Project
In Visual Studio, the Solution Explorer window lets you manage files for the project. Let’s take a look at the folders that have been added to your application in Solution Explorer. The web application template adds a basic folder structure:
Visual Studio creates some initial folders and files for your project. The first files that you will be working with later in this tutorial are the following:
File |
Purpose |
Default.aspx |
Typically the first page displayed when the application is run in a browser. |
Site.Master |
A page that allows you to create a consistent layout and use standard behavior for pages in your application. |
Global.asax |
An optional file that contains code for responding to application-level and session-level events raised by ASP.NET or by HTTP modules. |
Web.config |
The configuration data for an application. |
Running the Default Web Application
The default Web application provides a rich experience based on built-in functionality and support. Without any changes to the default Web forms project, the application is ready to run on your local Web browser.
1. Press the Ctrl+F5 key in Visual Studio. The application will build and display in your Web browser.
There are three main pages in this default Web application: Default.aspx (Home), About.aspx, and Contact.aspx. Each of these pages can be reached from the top navigation bar. There are also two additional pages contained in the Account folder, the Register.aspx page and Login.aspx page. These two pages allow you to use the membership capabilities of ASP.NET to create, store, and validate user credentials.
ASP.NET Web Forms Background
ASP.NET Web Forms are pages that are based on Microsoft ASP.NET technology, in which code that runs on the server dynamically generates Web page output to the browser or client device. An ASP.NET Web Forms page automatically renders the correct browser-compliant HTML for features such as styles, layout, and so on. Web Forms are compatible with any language supported by the .NET common language runtime, such as Microsoft Visual Basic and Microsoft Visual C#. Also, Web Forms are built on the Microsoft .NET Framework, which provides benefits such as a managed environment, type safety, and inheritance.
When an ASP.NET Web Forms page runs, the page goes through a life cycle in which it performs a series of processing steps. These steps include initialization, instantiating controls, restoring and maintaining state, running event handler code, and rendering. As you become more familiar with the power of ASP.NET Web Forms, it is important for you to understand the page life cycle so that you can write code at the appropriate life-cycle stage for the effect you intend.
When a Web server receives a request for a page, it finds the page, processes it, sends it to the browser, and then discards all page information. If the user requests the same page again, the server repeats the entire sequence, reprocessing the page from scratch. Put another way, a server has no memory of pages that it has processed—page are stateless. The ASP.NET page framework automatically handles the task of maintaining the state of your page and its controls, and it provides you with explicit ways to maintain the state of application-specific information.
Web Application Features in the Web Forms Application Template
The ASP.NET Web Forms Application template provides a rich set of built-in functionality. It not only provides you with a Home.aspx page, an About.aspx page, a Contact.aspx page, but also includes membership functionality that registers users and saves their credentials so that they can log in to your website. This overview provides more information about some of the features contained in the ASP.NET Web Forms Application template and how they are used in the Wingtip Toys application.
Membership
ASP.NET membership stores your users’ credentials in a database created by the application. When your users log in, the application validates their credentials by reading the database. Your project's Account folder contains the files that implement the various parts of membership: registering, logging in, changing a password, and authorizing access. Additionally, ASP.NET Web Forms supports OAuth and OpenID. These authentication enhancements allow users to log into your site using existing credentials, from such accounts as Facebook, Twitter, Windows Live, and Google.
By default, the template creates a membership database using a default database name on an instance of SQL Server Express LocalDB, the development database server that comes with Visual Studio 11 Beta.
SQL Server Express LocalDB
SQL Server Express LocalDB is a lightweight version of SQL Server that has many programmability features of a SQL Server database. SQL Server Express LocalDB runs in user mode and has a fast, zero-configuration installation that has a short list of installation prerequisites. In Microsoft SQL Server, any database or Transact-SQL code can be moved from SQL Server Express LocalDB to SQL Server and SQL Azure without any upgrade steps. So, SQL Server Express LocalDB can be used as a developer environment for applications targeting all editions of SQL Server. SQL Server Express LocalDB enables features such as stored procedures, user-defined functions and aggregates, .NET Framework integration, spatial types and others that are not available in SQL Server Compact.
Master Pages
An ASP.NET master page defines a consistent appearance and behavior for all of the pages in your application. The layout of the master page merges with the content from an individual content page to produce the final page that the user sees. In the Wingtip Toys application, you modify the Site.master master page so that all the pages in the Wingtip Toys website share the same distinctive logo and navigation bar.
HTML5
The ASP.NET Web Forms Application template uses
HTML5, which is the latest version of the HTML markup language. HTML5 supports new elements and functionality that make it easier to create Web sites. For example, the Wingtip Toys application uses HTML5 in the
Site.Master master page to create a navigation bar by placing a list of links inside the <nav>
element. You can easily modify the
nav element in the Site.Master page to create navigation for your own web applications.
Additional HTML5 elements in the ASP.NET Web Forms Application template include
<header>,
<footer>,
<article>,
<section>, and
<hgroup>.
The <header>
element encloses a group of navigational aids.
The <footer>
element typically contains information like who authored the section, copyright information, and links to related documents.
The <article>
element encloses content that can stand on its own and potentially be distributed independently of other content on the page.
The <section>
element’s role is to enclose a thematic grouping of content, usually with a heading.
The <hgroup>
element is useful when you want a group of a set of <h1>
to <h6>
elements that will be considered as a unit within the overall document outline.
Modernizr
For browsers that do not support HTML5, you can use Modernizr. Modernizr is an open-source JavaScript library that can detect whether a browser supports HTML5 features, and enable them if it does not. In the ASP.NET Web Forms Application template, Modernizr is installed as a NuGet package.
NuGet Packages
The ASP.NET Web Forms Application template includes a set of NuGet packages. These packages provide componentized functionality in the form of open source libraries and tools. There is a wide variety of packages to help you create and test your applications. Visual Studio makes it easy to add, remove, and update NuGet packages. Developers can create and add packages to NuGet as well.

When you install a package, NuGet copies files to your solution and automatically makes whatever changes are needed, such as adding references and changing your web.config file. If you decide to remove the library, NuGet removes files and reverses whatever changes it made in your project so that no clutter is left. NuGet is available from the Tools menu in Visual Studio.
jQuery
jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. The jQuery JavaScript library is included in the ASP.NET Web Forms Application template as a NuGet package.
Unobtrusive Validation
Built-in validator controls have been configured to use unobtrusive JavaScript for client-side validation logic. This significantly reduces the amount of JavaScript rendered inline in the page markup and reduces the overall page size.
Unobtrusive validation is added globally to the ASP.NET Web Forms Application template based on the setting in the <appSettings>
element of the
Web.config file at the root of the application.
Anti-XSS Library
The ASP.NET Web Forms Application template provides encoding routines that help to protect your application against cross-site scripting (XSS) attacks. XSS attacks attempt to inject client-side script into the pages of your web application. The Anti-XSS library also helps you to protect your application against LDAP injection attacks that are possible if user input is not properly validated.
Universal Providers
ASP.NET Universal Providers add provider support for all editions of SQL Server 2005 and later, as well as SQL Azure. By default, the ASP.NET Web Forms Application template includes the ASP.NET Universal Providers package from NuGet. This means that cloud storage of membership data can quickly be published to SQL Azure.
Entity Framework Code First
Besides the features in the ASP.NET Web Forms Application template, the Wingtip Toys application uses Entity Framework Code First, which is a NuGet library that enables code-centric development when you work with data. Put simply, it creates the database portion of your application for you based on the code that you write. Using the Entity Framework, you retrieve and manipulate data as strongly typed objects. This lets you focus on the business logic in your application rather than the details of how data is accessed.
Touring Visual Studio
The primary windows in Visual Studio include the Solution Explorer, the Server Explorer (Database Explorer in Express), the Properties Window, the Toolbox, the Toolbar, and the Document Window.
For more information about Visual Studio, see Visual Guide to Visual Web Developer.
Summary
In this tutorial you have created, reviewed and ran the default Web forms application. You have reviewed the different features of the default Web forms application and learned some basics about how to use the Visual Studio environment. In the following tutorials you'll create the data access layer.
Additional Resources
Choosing the Right Programming Model
Web Application Projects versus Web Site Projects
ASP.NET Web Forms Pages Overview

By Erik Reitan, Erik Reitan is a Senior Programming Writer at Microsoft. During his spare time he enjoys developing Windows Phone and Windows 8 apps. Follow him on Twitter at @ReitanErik.
- ← PreviousIntroduction and Overview
- You're ViewingCreate the Project
- → NextCreate the Data Access Layer
Comments (0) RSS Feed