What's New in Visual Web Developer

Visual Studio 2010 Service Pack 1 and the SP1 version of Visual Web Developer Express introduce the following features:

  • ASP.NET Web Pages with Razor Syntax. A new syntax for ASP.NET server-based code that facilitates ASP.NET Web development.

  • IIS Express. An alternative to the built-in Visual Studio Development Server that offers functionality similar to that of IIS 7.5.

  • SQL Server Compact 4.0 design-time support. The ability to use SQL Server Compact databases as part of a Web project. SQL Server Compact offers greater ease of development and deployment than SQL Server Express.

  • Web Deploy 2.0. Enhancements that include the ability to add dependencies to your project that can be deployed along with it (for example, SQL Server Compact or ASP.NET MVC).

Razor syntax is a simplified ASP.NET programming syntax that makes it easy to embed server-based code in the HTML markup of a Web page. For beginners, Razor syntax is easier to learn than ASP.NET. If you are an experienced ASP.NET developer, Razor syntax makes you more productive.

Razor is based on ASP.NET and the .NET Framework, so you still have access to these frameworks. The following example shows how Razor syntax is mixed with HTML to display information (in this case, information about the server). The @ character indicates Razor syntax that the server runs before sending the page to the browser.

<h1>Server Information</h1>
@foreach (var myItem in Request.ServerVariables)

ASP.NET Web pages that include Razor syntax have the .cshtml or .vbhtml file-name extension. When ASP.NET gets requests for files that have these extensions, it looks for code that is marked as Razor syntax and runs that code in order to create dynamic output.

The advantages of using Razor syntax instead of ASP.NET syntax include the following:

  • It minimizes the number of characters and keystrokes required in a file. Unlike most server-based Web programming syntaxes, you do not need to interrupt your coding to explicitly denote server blocks in HTML. The parser is smart enough to infer the blocks from your code. This makes the syntax much more compact and easy to type.

  • It lets you use your existing knowledge of C#, Visual Basic, and HTML, because it is based on them.

For more information, see Walkthrough: Creating a Web Site using Razor Syntax in Visual Studio.

IIS Express is a lightweight Web server that you can use to test projects in Visual Studio. IIS Express combines the simplicity of the Visual Studio Development Server with many Web server features offered by IIS 7.5. IIS Express offers the following features:

  • It is a small download and it consumes fewer system resources when it runs than IIS 7.5.

  • It works in Visual Studio 2010 SP1 and in Visual Web Developer 2010 Express SP1.

  • You do not have to use an administrator account to run or debug Web applications in Visual Studio.

  • Most development features available for IIS 7.5 are available for IIS Express.

You can install IIS Express by using the Microsoft Web Platform Installer. For information about how to use IIS Express with a Web project in Visual Studio, see How to: Specify the Web Server for Web Projects in Visual Studio.

For more information about IIS Express, see Web Servers in Visual Studio for ASP.NET Web Projects and the IIS.Net Web site.

SQL Server Compact 4.0 is an embedded database server that has a small memory footprint. Visual Studio 2010 SP1 Tools for SQL Server Compact 4.0 enable you to work with SQL Server Compact databases in Visual Studio Web projects.

Using SQL Server Compact databases and tools provides the following advantages over using the full SQL Server or SQL Server Express edition:

  • The SQL Server Compact engine runs in-process, not as a service, and therefore does not require administrator permissions to install, use, or deploy.

  • SQL Server Compact databases and tools are quick to install and set up. The total download for the database and tools is less than 20 MB.

  • Data storage is file based. Your data is stored in a single .sdf file, which you can copy to the App_Data folder of your ASP.NET application on a Web hosting site.

  • Database deployment is improved over SQL Server Compact 3.5. If you do not want to manually copy the required files to a host server, you can use the Visual Studio tools to create an automated deployment package. For a manual deployment, you can use an FTP utility or directly copy the database assemblies to the application's Bin folder, and then copy the .sdf data file to the App_Data folder. For automated deployment that uses the Visual Studio tools, you can add SQL Server Compact assemblies as dependencies to a deployment package.

  • Transact-SQL and .NET Framework data APIs are supported. You can use the same SQL commands and database code that you use with other versions of SQL Server.

  • ASP.NET data source controls are supported. For example, you can use the SqlDataSource and EntityDataSource controls to access SQL Server Compact databases.

  • Visual Studio design-time data tools are supported. This includes Server Explorer, the Query and View Designer, the Entity Designer, and the Dataset Designer.

To use SQL Server Compact with the Visual Studio 2010 SP1, install the following packages from the latest Microsoft Web Platform Installer:

  • Microsoft SQL Server Compact 4.0

  • Microsoft Visual Studio 2010 SP1 Tools for SQL Server Compact 4.0

Additional Resources for SQL Server Compact 4.0

For information about


Using SQL Server Compact with Visual Studio

Walkthrough: Working with SQL Server Compact in Visual Studio

SQL Server Compact Edition

SQL Server Compact Team Blog

Using existing Visual Studio design-time data tools to work with SQL Server Compact databases

Server Explorer/Database Explorer

Query and View Designer Tools

Dataset Designer

ASP.NET controls that you can use as data sources with a SQL Server Compact database

SqlDataSource Web Server Control Overview

EntityDataSource Web Server Control Overview

Deploying a SQL Compact Database to SQL Server

Walkthrough: Migrating a SQL Compact Database to SQL Server During Deployment

Visual Web Developer uses Web Deploy to deploy sites and applications to production servers. The Web Deploy 2.0 release offers the following new features in Visual Studio 2010 SP1:

To use the latest deployment features in Visual Studio 2010 SP1, install Web Deployment Tool 2.0 using the Microsoft Web Platform Installer.

For more information about Web deployment options for ASP.NET applications, see the following sources:

Community Additions