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: asp.net,project,template,4.0,css,xhtml