ASP.NET 4.0 New Features

Posted: January 5, 2011 in ASP.NET, Web Development
Tags:

ASP.NET 4.0 – New features/improvements for existing features

Core Services

  1. Web.config file refactoring – compilation tag (Default tag) – targetFramework=”4.0″ (default is 2.0)
  2. Extensible Output Caching – System.Web.Caching.OutputCacheProvider – local or remote disk, cloud storage, distributed cache engine
  3. Auto-start Web Application – IIS 7.5 – applicationHost.config – applicationPools tag – startMode=”AlwaysRunning”
  4. Permanently Redirecting Page – RedirectPermanent(“<UR>”), avoids HTTP 302 response used by Redirect and extra round trip to server
  5. Shinking Session State – SessionState tag – compressionEnabled=”true” – System.IO.Compression.GZipStream
  6. URL Size, Validation mechanism, extensible request validation – httpRuntime tag – maxRequestPathLength, maxQueryStringLength, requestPathInvalidChars
  7. Object Caching and Object Caching Extensibility – System.Web.Caching.Cache (old) – System.Runtime.Caching.dll (useful for both web, windows apps)
  8. Extensible HTML, URL and HTTP Header encoding
  9. Performance Monitoring for Individual Applications in a Single Worker Process
  10. Multi Targeting

AJAX

  1. Built-in support for JQuery in Web Forms and MVC
  2. CDN Suppport from MS – EnableCdn=”true” in ScriptManager tag
  3. ScriptManager Explicit Scripts – AjaxFrameworkMode=”Explicit”, asp:ScriptReference sub tag

Web Forms

  1. Meta Tags with Page.MetaKeywords and Page.Description properties
  2. Enabling View State for Individual Controls – default disabled in 4.0 – ViewStateMode
  3. Changes to Browser Capabilities – HttpBrowserCapabilities – uses browser definition files which are updated to include more browsers and devices
  4. Browser Capability Providers/Replacing existing logic or extending it
  5. Builtin support for Routing with Web Forms (available from 3.5 SP1) – Mainly for Search Engine Optimization – easy ways to use – RouteTable.Routes.MapPageRoute, RouteTable.Routes.Add/PageRouteHandler, Page.RouteData.Values[“<key>”] – accessing in codebehind, <%$RouteUrl:Key%>
  6. Setting ClientIDs – ClientIDMode – AutoID/Static/Predictable (for data bound controls)
  7. Built-in support for Chart Controls (available from 3.5 SP1) – 35 types, 3D support … etc
  8. Filtering data with QueryExtender on EntityDataSource/LinqDataSource – Search/Range operations
  9. Html Encoded Code Expression – <%: expression%> = <%=HttpUtility.HtmlEncode(expression)
  10. Project Template Changes
  11. Compatibility Setting for Rendering – pages tag – controlRenderingCompatabilityVersion=”3.5|4.0″ – 4.0 renders XHTML 1.0 strict markup
  12. Disabling Controls – as per HTML 4.01 spec it is meant for input tag elements – strictly followed in 4.0 and default class will be included for other tags
  13. Div around hidden fields
  14. Controlling table markup rendering for templated controls – RenderOuterTable property for FormView/Login/PasswordRecovery/ChangePassword/Wizard/CreateUserWizard
    Control enhancements – ListView, CheckBoxList/RadionButtonList – RepeatLayout=”Flow/Table(OrderList/UnorderedList)”, Menu control – renders ol/ul instead of Table, Wizard controls

Visual Studio 2010

  1. HTML/JS Snippets
  2. JS IntelliSense
  3. Better web packaging, remote web app deployment with one click, DB Deployment
  4. web.config Transformation

ASP.NET MVC Improvements – TBA

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s