subject: What's New in ASP.NET 4.0 - a Summary of New Features in Microsoft ASP.NET 4.0 [print this page] What's New in ASP.NET 4.0 - a Summary of New Features in Microsoft ASP.NET 4.0
ASP.NET isn't a huge upgrade, but there are some features which will make your life as a website devleoper easier. This article gives a summary of what's new in ASP.NET 4.0.
Permanent Redirection
There is no a command called Response.RedirectPermanent. As the name suggests, this not only redirects you to another page, but also stores this setting internally, avoiding you having to add a redirection using IIS. A welcome new facility!
Fixed Element Ids
It has always been difficult in ASP.NET to use client-side script, because you never know what an element will be called. As an example, if you create a textbox with an id of txtName, how do you know how this will be rendered on the server? ASP.NET 4.0 gets round this with a simple solution: you can set the ClientIdMode property of a web server control. Set this to Predictable and it will be ... just that!
Meta Properties
The easiest way to set Meta properties such as descriptions and keywords for a page previously has been using master pages. Now you can do this on page load, using the new MetaKeywords and MetaDescription properties. More small but welcome additions to ASP!
Development and Live Web.Config Files
Developers always had to avoid publishing entire ASP.NET websites previously, for fear that they would overwrite the live web.config file with the test version. You can now create overridable settings in the web.config file to overcome this problem.
Other Changes
Other changes in ASP.NET 4.0 include the facility to create SilverLight applications (which we think HTML 5 will gradually make redundant) and the ability to insert ASP.NET code snippets.