Starter Project Templates (VS 2010 and .NET 4.0 Series)
page 3 of 5
by Scott Guthrie
Feedback
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 23155/ 48

Creating a New Project using a Starter Template

VS 2010 also ships with starter template projects that allow you to create a new ASP.NET application that has some layout/CSS structure and common functionality already implemented within it. 

We first tried this concept with ASP.NET MVC 1.0 – whose project template provides a master page, CSS file, JavaScript libraries, login system, and a “home” and “about” page already wired up and implemented.  VS 2010 adds support for this idea when creating new ASP.NET Web Forms projects as well. 

When you choose the default “ASP.NET Web Application” project template, you’ll find that the ASP.NET Web Forms project created already has some directories and files contained within it:

Figure 2

It includes a Site.Master master page file that provides an overall layout for the site (with headers, footers, etc), and which uses a CSS stylesheet for all styles.  It has a “Scripts” directory that contains jQuery within it (ASP.NET AJAX is available via the script manager control).  It includes a “default.aspx” and “about.aspx” pages in the root directory that are based on the master page and include some boiler plate content.  And it includes an “Account” directory that has some pages that implement a forms-based authentication system for users to log-in, register and change their passwords:

Figure 3

You can run the project without having to write any code or configure anything, and get a nice site up and running:

Figure 4

The site has full support for forms based security authentication, and is pre-wired up to use the ASP.NET Membership system for password management:

Figure 5

All of the styles and content within the site are configured using CSS, and take advantage of some of the new features with Web Forms in ASP.NET 4 – including clean client-side “id” names (no more ctrl_ mangled names – ASP.NET 4 gives you complete control over the client id), and CSS based rendering instead of table based rendering for the built-in server controls.  I’ll discuss these new Web Forms features in a lot more depth in later posts in this series (along with a lot of other features being added).


View Entire Article

User Comments

Title: what's a proper web.configuration?   
Name: Adrian
Date: 2010-02-04 5:46:01 PM
Comment:
I have this issue with a web.config file that keeps giving me errors every time I try to access the CRTLAB-SP link within the recent connections category. Is there an example of a proper configuration of line 322, line 2 within the web.Config file? If so, I sure could use it. Thanks for your assistance.

Respectfully,

Adrian

Product Spotlight
Product Spotlight 





Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2024 ASPAlliance.com  |  Page Processed at 2024-04-24 9:18:31 AM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search