ASP.NET Web Tools 2012.2 is an ASP.NET release with features including entire ASP.NET family (Web Forms, MVC, Web API). This release also includes new tooling for Visual Studio 2012 that improve the web development experience.This post overviews the features in this incremental release. You can download the tools from here.The installation is pretty quick and it would not ask you to reboot your machine. Installing this release would no affect your existing projects as there is no change in the ASP.NET runtime. New project templates and new web tooling are introduced in this release.
What is new in this release?
In the new templates department, you have templates for Web Forms for SignalR and ASP.NET Web API. Facebook and Single Page Application templates for ASP.NET MVC. On Web Tooling side you have got updates on Page Inspector, Intellisense and on Editor.
The installation screen looks as below
ASP.NET Web Forms update
The new thing in Web Forms is it supports Friendly URLs. Earlier this feature was available as nuguet package but now when you create a new web form project it automatically installs the package and configures for you.It allows you to create nice looking semantic URLs. There is also a support for FriendlyUrlSegments attribute which allows you to bind this to controls or to access it in your methods. The mark up looks as below
The code behind in edit.aspx having a method which brings the details of the Album by taking an id
By default the Route.config file in App_Start folder contains the below statement
It is a new addition to ASP.NET, Now it is officially shipped by Microsoft ASP.NET team. SignalR enables you to do the real time browser-server communication that uses the best technology client and server support.
In the Add new item dialogue box you can find two new class templates
Add the below piece of code to broad cast the hit count to all of itâ€™s clients
SingalR allows two things , server to allow methods to call clients and client to call methods on server. In this example the server method is RecordHit and client method is onHitRecorded. The client calls to this method looks as below
New features for ASP.NET Web API
ASP.NET Web API ships along with MVC4 , Web API allows you to deliver the formats like JSON and XML.Three new features in this release for Web API are
- Help Generation
When you create a new MVC4 project in Visual Studio 2012, you will get a new area called Help page, it looks at your Web API calls and documents the calls for you.
When you run this application you will see a new thing in the header
The great advantage of this feature is you no need to prepare a document for your API and more over it generates the help on your methods up to date. It is also extensible and you have an option to change the display templates. The trace output window in Visual Studio 2012 shows all the requests that you made to your API
OData features can be read here. New templates Facebook Application and Single Page Application have introduced in MVC4