Skip Navigation LinksHome > Categories > Code from a Category

Whats new in ASP.Net 4.0 and Framework 4.0

User Name: codelecturer
Name: Mike Chauhan
Contact Me:
Home Page:
6 years of total IT experience including programming, application development, System Maintenance . 3 years of Experienced and expertise in .Net Framework VB, Visual Basic.Net, ASP.Net 2.0, 3.5 and AD... [More]
Viewed Times: 2213
Add Date: 11/18/2011
Microsoft.NET Framework 4.0 beta version is out now. Let’s see the what’s new in 4.0 for the developer purpose. There are lots of features are there. Some of them are following.
1) Extensible Output Caching:
ASP.NET 4.0 adds an extensibility to output caching now you can create your cache provider and will can use this provider for the caching. So now you can use your own data source for you caching.

2) AutoStart Webapplication
Before 4.0 you have to use application_load or application_start event for the extensive data processing before application pages loads. But now you can use auto start features of 4.0. A new scalability feature named auto-start that directly addresses this scenario is available when ASP.NET 4.0 runs on IIS 7.5 on Windows Server 2008 R2. The auto-start feature provides a controlled approach for starting up an application pool, initializing an ASP.NET application, and then accepting HTTP requests.

3) Permanently Redirecting a page
Before 4.0 you need to use response.redirect method to go to another page from new page. ASP.NET, developers have traditionally handled requests to old URLs by using the Response.Redirect method to forward a request to the new URL. However, the Redirect method issues an HTTP 302 Found (temporary redirect) response, which results in an extra HTTP round trip when users attempt to access the old URLs. Now permanent redirect will solve this. Its will also benefit for the Search Engine Optimization.

4) Compressed Session State:
ASP.NET 4.0 will have new option for session stored in sql server or in state service. You can compress your serialized session using GZip Compression

5) Page.Keywords and Page.Description Properties
In 4.0 now you can create dynamic keywords and description for a page using Page.Keywords and Page.Description Properties

6) Enabling View state for Individual Controls
In earlier version of the if you disable your parent control view state it will disable your child control view state but now with view state is not dependent on parent child control view state.

7) Routing in 4.0
Now you can have build in routing for your pages. You don’t have to write your url rewriting modules. It introduces a WebFormRouteHandler routing class which will take care of routing.

8) ClientID
In earlier version clientId is system generated and if you want to change you have to override it . ASP.NET by default generated a big string for the clientid which will increase your html kb. With you have small client id using different options Legacy,Static,Predictable,Inherit

There are several other features are also there like following 1. Live Data Binding 2. Observer pattern using JavaScript and JavaScript objects 3. ADONetServiceProxy Class 4. Formview Control Ehancements 5. Ajax Improvements in 4.0

Post a Comment

Name: (Optional)
Email: (Optional, you can get an email if somebody replys your comments)*
Email me if somebody respons my comment below:
Enter Text
as Below:
(case insensitive, if hard to read, click the "get a new one" button)
* Your email address will not be shared with any third parties for any reason.
** Maximum 1000 charactors.