Welcome to MSDN Blogs Sign in | Join | Help

Mike Ormond's Blog

In my world, things would be simpler than this...

News

  • Add to Technorati Favorites

    These postings are provided "AS IS" with no warranties, and confer no rights. The use of any script / code samples is subject to the terms specified here.

ASP.NET 4.0 - New Project Templates

There’s been a few changes to the project templates in ASP.NET 4.0 to make things cleaner and simpler. I really like them. First off is the streamlining of web.config by moving boilerplate configuration to machine.config. Applications simply inherit these settings.

Apart from anything else (like being able to find that elusive entry in your web.config file) this also reduces the dependence on Visual Studio to create new web projects (or finding an “old” web.config to copy").

templates

If you create an Empty Web Site in VS2010 Beta 2, this is what your web.config file looks like:

webconfig

The standard ASP.NET Web Site template has also been changed to add basic layout, styles and functionality such as membership. The ASP.NET Web Forms template takes its lead from the ASP.NET MVC template here.

This is the default content for an ASP.NET Web Forms site in VS2010 – note the Account folder (membership pages), Scripts folder (jquery scripts), Styles folder (stylesheet), site master and global.asax.

website1

This is what the “vanilla” app looks like running.

website2

And if you click on the Log In link in the top right hand corner.

website3

According to the documentation the default site should be a two-column layout but in Beta 2 I don’t think it’s quite there. The stylesheet looks to be still in a state of flux. Anyway, the design is fully XHTML 1.0 strict compliant markup giving you a solid foundation for customising to your desired design.

validation

Download VS2010 Beta 2 / .NET 4.0 (including ASP.NET 4.0 and ASP.NET MVC 2)
Check out the ASP.NET 4.0 and VS2010 Beta 2 Web Development whitepaper

 

Technorati Tags: ,,,,,
Posted: Friday, November 13, 2009 5:07 PM by MikeOrmond

Comments

Richard said:

Is there a reason the new Web Forms site template uses a styles directory rather than an App_Themes directory?

# November 24, 2009 4:46 AM

MikeOrmond said:

Hi Richard. I assume because the ASP.NET Theming capability is not explicitly being used they've stuck with the common practice of a standard folder (styles / content / images / layout etc). Mike

# November 24, 2009 9:31 AM
Leave a Comment

(required) 

(required) 

(optional)

(required) 

  
Enter Code Here: Required

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Page view tracker