Developing for the web using VS 2010 and .NET 4

Visual Studio 2010 and .NET 4 are packed with new features and enhancements designed to improve developer productivity.  Some are small changes and others are more significant.  Altogether they deliver a significant gain in productivity.

More and more developers look to the web to be able to build and deliver applications that take advantage of the reach and friction-free capabilities of the web.  With Visual Studio 2010 and ASP.NET 4, there are a number of new features to help you do just that.  I want to highlight a few of the new features here.

Snippets for HTML, ASP.NET and JavaScript

C# and VB users have used snippets for years to accelerate developer productivity.   Now web developers can experience these same productivity gains with their HTML and ASP.NET markup and JavaScript.  There are hundreds of new snippets that help you auto-complete common ASP.NET and HTML tags, including required attributes (such as runat="server") and common attributes specific to a tag (such as ID, DataSourceID, ControlToValidate, and Text).


 RadioButtonList snippet

Dynamic IntelliSense for JavaScript

One of the biggest challenges developers face when coding with dynamic languages such as JavaScript is that types are dynamically being added and changed.  This is can render IntelliSense almost useless.  In Visual Studio 2010, the JavaScript IntelliSense engine has been redesigned to work smoothly for dynamic types.  For example, you’ll now get IntelliSense for types generated by registerNamespace.  The engine also adds support for most common JavaScript libraries.  Below is an example of IntelliSense for a newly-registered type with a new function.

JavaScript IntelliSense 

Streamlined Web Deployment

Web deployment has always been a very challenging problem for web developers.  Application logic, databases, IIS settings, data and configuration transforms all may need to be applied before deployment.

Now, MSDeploy, a new deployment tool, packages all the settings, files and data associated with a web application.  These packages can then be deployed to remote sites or archived for future retrieval. The IIS7 management console now includes a wizard to import packages created by MSDeploy.

Visual Studio 2010 seamlessly integrates MSDeploy into the web development workflow and adds commonly-requested features such as automation of web.config transformations to modify common settings (such as web service end points and connection strings) and database deployment before moving from a developer’s machine to a staging or production server.  Below is the new simplified publishing dialog:


New Application Templates

Getting started with web development can seem daunting for the new web developer. Visual Studio 2010 includes starter web application templates for ASP.NET 4.  These templates include everything you need to get started: a master/content pattern for page consistency, menus, login, and CSS style sheets and jQuery for building JavaScript-rich apps.  These templates give you get a working web application right from the start so you can get to work adding your own functionality.

CSS Improvements

ASP.NET controls now have a ClientIDMode property that allows you to change how ASP.NET controls generate the ClientID.  Knowing the ClientID is particularly important when styling with CSS or writing JavaScript to access the HTML DOM.

The HTML designer in Visual Studio 2010 has enhanced support for CSS 2.1 that provides a more accurate rendering at designtime compared with how the browser will render the page at runtime.

More Screen Real Estate

One of the most valuable commodities in a development environment is screen real estate.  Visual Studio 2010 offers an immense array of options developers can customize to optimize their screen real estate and development experience.  The Code Optimized Web Profile optimizes these settings to maximize screen real estate and bring the commands most commonly used by the Source View developer to your fingertips.  You can choose the Code Optimized Web Profile when you start Visual Studio for the first time or change your profile later using the Tools | Import and Export Settings… menu item.

Code Optimized Profile 

Clean Web.Config

Sometimes less is more.  This is one of those features.  When ASP.NET was first introduced, a web.config file wasn’t even required.  When it was, it often only contained a few entries.   As new capabilities were added to ASP.NET, the web.config file grew in size and complexity, making the file more difficult to read and maintain.  ASP.NET 4 brings back the minimal configuration file.

URL Routing with ASP.NET WebForms

URL routing is a feature common to MVC projects.  ASP.NET 4 supports URL routing for web forms.  Now you can define URLs that are meaningful to your app and understandable by users.  These simplified URLs also help with search engine optimization (SEO).

Learn More

This is only a sample of the improvements for web developers in Visual Studio 2010.  You can see a complete list of new features for web development here.


One More Thing... 

If you have been using Visual Studio 2010 Beta 2, we'd like to hear from you.  Please take the survey and tell us about your experiences.


Got Feedback?



Comments (10)

  1. anon says:

    In a nutshell vs2010 has nothing special about!

    I think web forms will be dead soon or late same as classic asp. 🙁

  2. Tom says:

    Good improvements. Just wish around the time of release of .NET 4.0 you guys provide us with free videos/training.

  3. anirudha says:

    Why are you not discussed about VS 2010 beta 2 performance & it’s bug like line number is not show

    when i use VS 2010 professional i see more bug & mistake in it

  4. anirudha says:

    How i can show this countdown widget in our blog

  5. phuff says:

    Anirudha, you can learn how to add the countdown widget to your blog here:

    Polita Paulus

    Developer Division


  6. adorei estes produtos pois terei o maximo prazer de poder desfrutar dos mesmo pois serão muitíssimo util aos meus trabalhos domésticos pois me oferece mais segurança em tudo muito obrigado a toda equipe microsoft por se preocuparem com um saite mais seguro

  7. Tax Liens says:

    Web deployment has always been a very challenging problem for web developers.  Application logic, databases, IIS settings, data and configuration transforms all may need to be applied before deployment.

  8. Abhi says:

    Any updates on how to get Line Numbers in Visual Web Developer 2010???

  9. Srini says:

    I subscribe to Windows Azure as i wanted me and my

    team to perform more interesting work. it is very difficult to understand Windows Azure pricing from internet and microsoft pages.

    Is there any plan to help developers?

  10. Udi Mishan says:

    I would like to ask a question about the framework 4.0 please.

    A while ago, in framework 2.0 microsoft has released a pack called "provider toolkit samples" which included source code for some of the main providers of the .net framework: membership, roles, sql state, etc.

    This thing was realy great! and we’ve all used it to do some custom adjustments to those great providers.

    the problem was that microsoft released an outdated source code. i could see, for example, that the sql state didnt include the Partition Resolver feature etc. and there were some suspiciues remarks inside the code.

    I thing i speak for all of us developers when i say that we would like a release of the latest providers source code for the framework 4.

    that will be realy realy great and we will all apricitate Microsoft for that!

Skip to main content