SlideShare a Scribd company logo
New Features of ASP.NET 4.0Buu Nguyen, MVP (ASP.NET)www.buunguyen.net/blogbuunguyen@kms-technology.comMicrosoft Confidential1
AgendaASP.NET Web Forms 4.0ASP.NET AJAX 4.0ASP.NET MVC 2.0ASP.NET Dynamic Data
ASP.NET Web Forms 4.0
Web Forms 4.0SEO ImprovementsClean HTMLChart Control
Meta TagsAvailable in Page directive & Page objectsetout
RoutingTired of ugly URLs yet?Routing to rescuehttp://server/songs.aspx?genre=rockhttp://server/albums.aspx?year=2010&month=4&day=12http://server/songs/rockhttp://server/albums/2010/4/12
Routingdefineuselink
Meta Tags & Routing Demo
Web Forms 4.0SEO ImprovementsClean HTMLChart Control
Client IDs before 4.0Microsoft Confidential10Not so CSS-friendly and JS-friendly!!!
Client IDs in ASP.NET 4.0ClientIDMode gives developers controlCan be specified at different levelsmachine.config and web.configPageControl
ClientIDMode
Client IDs Demo
Semantically Correct MarkupRendering versionMenu control generates <ul>, <li>CheckBoxList’s and RadioButtonList’sRepeatLayout now has 4 valuesTable (old)Flow (old)OrderedList (new)UnorderedList (new)Many other small improvements
Web Forms 4.0SEO ImprovementsClean HTMLChart Control
Chart Control35 chart types3-D supportAjax supportData bindingStatistical formulaeHighly customizabilityAppearance & data serialization
Simple Static Chart
Dynamically Populated Chart
Chart Control Demo
ASP.NET AJAX 4.0
The ASP.NET AJAX Family
ASP.NET Ajax LibraryJavaScript libraryServer-side platform agnosticInclude Ajax Control Toolkit (with client-side support)Tight integration with the “adopted” jQuerySupport client-side template with DataViewProvide script loaderSupport invoking web servicesWork seamlessly with ASP.NET servicesReleased separately from ASP.NET and VS.NETLatest version: 0911 betahttp://ajax.codeplex.comMicrosoft Confidential22
Using Client ControlsAll ACT controls now available at client-sideAlso known as “Client Controls”Also exposed as jQuery’s pluginsMicrosoft Confidential23
Script LoaderManage scripts & dependenciesDetect script duplicationLoad scripts in parallelEnable lazy script loadingMicrosoft Confidential24
Client Controls & Script Loader Demo
DataViewA JavaScript component allowing JSON data to be bound to an HTML templateSupport 2-way binding, master-detail, and conditional renderingCan retrieve data from local or services (e.g. ASMX, WCF, and WCF Data Services etc.)Microsoft Confidential26
DataView Demo
ASP.NET MVC 2.0
Technology StackASP.NET Web FormsASP.NET MVCASP.NET Framework(Configuration, Security, Membership, Roles, Profiles, Routing, Caching, Session, Application State, Cookie, .aspx/.ascx/.asax/.master files etc..NET Framework
MVC 2.0Separation of ConcernsModel-based ValidationModel RenderingScalability
AreasAllow an MVC app to have multiple “areas”Like sub-projects although sharing 1 appEach area defines its routesMicrosoft Confidential31
Partial ActionRender partial might cause coupling except for no-model partial viewPartial action to rescue: invoke action which renders UIMicrosoft Confidential32
MVC 2.0Separation of ConcernsModel-based ValidationModel RenderingScalability
Model ValidationModel validation in MVC 1.0 is ad-hocxVal (http://xval.codeplex.com)ASP.NET MVC Validation Library (http://aspmvcvalidation.codeplex.com/)      ASP.NET MVC 2.0 solves this nicelyClient-side and server-side validationProvider for Data Annotations on server-sideAdapters jQuery and MS AJAX on client-side
Applying ValidationModelAction MethodView
Model Validation Demo
MVC 2.0Separation of ConcernsModel-based ValidationModel RenderingScalability
Strongly-Typed Helpers1.0 Way2.0 Way
Model TemplatesASP.NET can render model based metadata provided by developersBuilt-in templates for data typesBuilt-in provider for Data AnnotationsData Annotations attributesDisplayName, HiddenInput, DataType, ReadOnly, ScaffoldColumn, DisplayFormat, and UIHint
Helper MethodsDisplayEditor
Model Templates Demo
Custom TemplatesMVC is shipped with built-in templatesCan override templates easily
Custom Templates Demo
MVC 2.0Separation of ConcernsModel-based ValidationModel RenderingScalability
Asynchronous ControllerNo blocking-thread during IO/network-bound operation => improved throughputSource: http://msdn.microsoft.com/en-us/library/ee728598%28VS.100%29.aspx
Asynchronous Controller Demo
Dynamic Data
OverviewBuilt-in page, entity, field and filter templatesEasy to customize or add new templatesDeclarative validation and renderingIntegrated with ASP.NET Web Forms and MVC applications
Dynamic Data Demo
References50
ASP.NET Web Forms 4.0URL Routinghttp://weblogs.asp.net/scottgu/archive/2009/10/13/url-routing-with-asp-net-4-web-forms-vs-2010-and-net-4-0-series.aspxClient IDshttp://weblogs.asp.net/scottgu/archive/2010/03/30/cleaner-html-markup-with-asp-net-4-web-forms-client-ids-vs-2010-and-net-4-0-series.aspxChart Control http://www.4guysfromrolla.com/articles/072209-1.aspxSEO Improvementshttp://weblogs.asp.net/scottgu/archive/2010/01/05/asp-net-4-seo-improvements-vs-2010-and-net-4-0-series.aspx
ASP.NET AJAX 4.0Libraries & source code for Ajax Libraryhttp://ajax.codeplex.comTutorials & sample apps for Ajax Libraryhttp://www.asp.net/ajaxlibraryMicrosoft Ajax CDNhttp://www.asp.net/ajaxLibrary/cdn.ashxMicrosoft Ajax Minifier 4.0http://aspnet.codeplex.com/releases/view/40584
ASP.NET MVC 2.0Model validationhttp://weblogs.asp.net/scottgu/archive/2010/01/15/asp-net-mvc-2-model-validation.aspxModel Templateshttp://bradwilson.typepad.com/blog/2009/10/aspnet-mvc-2-templates-part-1-introduction.htmlStrongly-typed Helpershttp://weblogs.asp.net/scottgu/archive/2010/01/10/asp-net-mvc-2-strongly-typed-html-helpers.aspxAreashttp://msdn.microsoft.com/en-us/library/ee671793%28VS.100%29.aspxAsynchronous Controllerhttp://msdn.microsoft.com/en-us/library/ee728598%28VS.100%29.aspx
ASP.NET Dynamic DataDynamic Data Presentation Layer Customizationhttp://msdn.microsoft.com/en-us/library/ee211433%28VS.100%29.aspxDynamic Data Schema Customizationhttp://msdn.microsoft.com/en-us/library/ee225428%28v=VS.100%29.aspx

More Related Content

PPT
New Features Of ASP.Net 4 0
PPTX
Web forms in ASP.net
PPTX
ASP.NET Lecture 1
PPTX
ASP.NET Presentation
PPTX
Introduction to ASP.NET
PPTX
Introduction to asp.net
DOC
Tutorial asp.net
PPT
Asp.net
New Features Of ASP.Net 4 0
Web forms in ASP.net
ASP.NET Lecture 1
ASP.NET Presentation
Introduction to ASP.NET
Introduction to asp.net
Tutorial asp.net
Asp.net

What's hot (20)

PPTX
Asp Net Advance Topics
PPTX
Developing an aspnet web application
PPT
Asp.net basic
PPTX
Asp.net presentation by gajanand bohra
PPSX
ASP.NET Web form
PPTX
Asp .net folders and web.config
PDF
Asp .net web form fundamentals
PPT
ASP.NET 4.0 Roadmap
PPT
.net training | learn .net | Microsoft dot net Course | Microsoft dot net onl...
PPSX
All About Asp Net 4 0 Hosam Kamel
PPT
PPT
ASP.NET Tutorial - Presentation 1
PPTX
Learning ASP.NET 5 and MVC 6
PPTX
New microsoft office power point presentation
PDF
ASP.NET Overview - Alvin Lau
PPTX
Industrial training seminar ppt on asp.net
PPTX
Introduction to asp
PPSX
Asp.net mvc
PPTX
MVC - Introduction
Asp Net Advance Topics
Developing an aspnet web application
Asp.net basic
Asp.net presentation by gajanand bohra
ASP.NET Web form
Asp .net folders and web.config
Asp .net web form fundamentals
ASP.NET 4.0 Roadmap
.net training | learn .net | Microsoft dot net Course | Microsoft dot net onl...
All About Asp Net 4 0 Hosam Kamel
ASP.NET Tutorial - Presentation 1
Learning ASP.NET 5 and MVC 6
New microsoft office power point presentation
ASP.NET Overview - Alvin Lau
Industrial training seminar ppt on asp.net
Introduction to asp
Asp.net mvc
MVC - Introduction
Ad

Similar to New Features of ASP.NET 4.0 (20)

PPT
ASP.NET 3.5 SP1 (VSLive San Francisco 2009)
PPTX
Walther Aspnet4
PPS
Introduction To Mvc
PPT
ASPNET Roadmap
PPTX
Asp.Net Mvc
PPTX
Asp.Net MVC Intro
PPTX
What's new in ASP.NET 4
PPTX
Head first asp.net mvc 2.0 rtt
PDF
Asp.net mvc basic introduction
PPTX
ASP.net MVC Introduction Wikilogia (nov 2014)
PDF
PDF
ASP.NET MVC 2.0
PPTX
Introduction to ASP.Net MVC
PPTX
MVC & SQL_In_1_Hour
PPTX
What’s New in ASP.NET 4
PPTX
Improve your Web Development using Visual Studio 2010
PPTX
Mvc 4 0_jayant_jindal_28082010
PDF
ASP NET 4 0 in Practice Daniele Bochicchio
PPTX
Aspnet mvc
PPT
ASP.NET MVC Presentation
ASP.NET 3.5 SP1 (VSLive San Francisco 2009)
Walther Aspnet4
Introduction To Mvc
ASPNET Roadmap
Asp.Net Mvc
Asp.Net MVC Intro
What's new in ASP.NET 4
Head first asp.net mvc 2.0 rtt
Asp.net mvc basic introduction
ASP.net MVC Introduction Wikilogia (nov 2014)
ASP.NET MVC 2.0
Introduction to ASP.Net MVC
MVC & SQL_In_1_Hour
What’s New in ASP.NET 4
Improve your Web Development using Visual Studio 2010
Mvc 4 0_jayant_jindal_28082010
ASP NET 4 0 in Practice Daniele Bochicchio
Aspnet mvc
ASP.NET MVC Presentation
Ad

More from Buu Nguyen (10)

PDF
On Becoming a Technical Lead
PDF
C# 3.0 and 4.0
PDF
Stories about KMS Technology
PDF
ASP.NET MVC 3
PDF
HTML5 in IE9
PDF
Dynamic Binding in C# 4.0
PPTX
Building Scalable .NET Web Applications
PPTX
C# 4.0 and .NET 4.0
PPTX
Combres
PPTX
Fasterflect
On Becoming a Technical Lead
C# 3.0 and 4.0
Stories about KMS Technology
ASP.NET MVC 3
HTML5 in IE9
Dynamic Binding in C# 4.0
Building Scalable .NET Web Applications
C# 4.0 and .NET 4.0
Combres
Fasterflect

Recently uploaded (20)

PPTX
SOPHOS-XG Firewall Administrator PPT.pptx
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
August Patch Tuesday
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Spectral efficient network and resource selection model in 5G networks
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
NewMind AI Weekly Chronicles - August'25-Week II
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PDF
Univ-Connecticut-ChatGPT-Presentaion.pdf
PDF
A comparative study of natural language inference in Swahili using monolingua...
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPTX
1. Introduction to Computer Programming.pptx
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPTX
TechTalks-8-2019-Service-Management-ITIL-Refresh-ITIL-4-Framework-Supports-Ou...
SOPHOS-XG Firewall Administrator PPT.pptx
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
gpt5_lecture_notes_comprehensive_20250812015547.pdf
MIND Revenue Release Quarter 2 2025 Press Release
Building Integrated photovoltaic BIPV_UPV.pdf
Diabetes mellitus diagnosis method based random forest with bat algorithm
August Patch Tuesday
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Encapsulation_ Review paper, used for researhc scholars
Spectral efficient network and resource selection model in 5G networks
Programs and apps: productivity, graphics, security and other tools
NewMind AI Weekly Chronicles - August'25-Week II
Group 1 Presentation -Planning and Decision Making .pptx
Univ-Connecticut-ChatGPT-Presentaion.pdf
A comparative study of natural language inference in Swahili using monolingua...
Reach Out and Touch Someone: Haptics and Empathic Computing
1. Introduction to Computer Programming.pptx
Digital-Transformation-Roadmap-for-Companies.pptx
TechTalks-8-2019-Service-Management-ITIL-Refresh-ITIL-4-Framework-Supports-Ou...

New Features of ASP.NET 4.0

  • 1. New Features of ASP.NET 4.0Buu Nguyen, MVP (ASP.NET)www.buunguyen.net/[email protected] Confidential1
  • 2. AgendaASP.NET Web Forms 4.0ASP.NET AJAX 4.0ASP.NET MVC 2.0ASP.NET Dynamic Data
  • 4. Web Forms 4.0SEO ImprovementsClean HTMLChart Control
  • 5. Meta TagsAvailable in Page directive & Page objectsetout
  • 6. RoutingTired of ugly URLs yet?Routing to rescuehttp://server/songs.aspx?genre=rockhttp://server/albums.aspx?year=2010&month=4&day=12http://server/songs/rockhttp://server/albums/2010/4/12
  • 8. Meta Tags & Routing Demo
  • 9. Web Forms 4.0SEO ImprovementsClean HTMLChart Control
  • 10. Client IDs before 4.0Microsoft Confidential10Not so CSS-friendly and JS-friendly!!!
  • 11. Client IDs in ASP.NET 4.0ClientIDMode gives developers controlCan be specified at different levelsmachine.config and web.configPageControl
  • 14. Semantically Correct MarkupRendering versionMenu control generates <ul>, <li>CheckBoxList’s and RadioButtonList’sRepeatLayout now has 4 valuesTable (old)Flow (old)OrderedList (new)UnorderedList (new)Many other small improvements
  • 15. Web Forms 4.0SEO ImprovementsClean HTMLChart Control
  • 16. Chart Control35 chart types3-D supportAjax supportData bindingStatistical formulaeHighly customizabilityAppearance & data serialization
  • 22. ASP.NET Ajax LibraryJavaScript libraryServer-side platform agnosticInclude Ajax Control Toolkit (with client-side support)Tight integration with the “adopted” jQuerySupport client-side template with DataViewProvide script loaderSupport invoking web servicesWork seamlessly with ASP.NET servicesReleased separately from ASP.NET and VS.NETLatest version: 0911 betahttp://ajax.codeplex.comMicrosoft Confidential22
  • 23. Using Client ControlsAll ACT controls now available at client-sideAlso known as “Client Controls”Also exposed as jQuery’s pluginsMicrosoft Confidential23
  • 24. Script LoaderManage scripts & dependenciesDetect script duplicationLoad scripts in parallelEnable lazy script loadingMicrosoft Confidential24
  • 25. Client Controls & Script Loader Demo
  • 26. DataViewA JavaScript component allowing JSON data to be bound to an HTML templateSupport 2-way binding, master-detail, and conditional renderingCan retrieve data from local or services (e.g. ASMX, WCF, and WCF Data Services etc.)Microsoft Confidential26
  • 29. Technology StackASP.NET Web FormsASP.NET MVCASP.NET Framework(Configuration, Security, Membership, Roles, Profiles, Routing, Caching, Session, Application State, Cookie, .aspx/.ascx/.asax/.master files etc..NET Framework
  • 30. MVC 2.0Separation of ConcernsModel-based ValidationModel RenderingScalability
  • 31. AreasAllow an MVC app to have multiple “areas”Like sub-projects although sharing 1 appEach area defines its routesMicrosoft Confidential31
  • 32. Partial ActionRender partial might cause coupling except for no-model partial viewPartial action to rescue: invoke action which renders UIMicrosoft Confidential32
  • 33. MVC 2.0Separation of ConcernsModel-based ValidationModel RenderingScalability
  • 34. Model ValidationModel validation in MVC 1.0 is ad-hocxVal (http://xval.codeplex.com)ASP.NET MVC Validation Library (http://aspmvcvalidation.codeplex.com/) ASP.NET MVC 2.0 solves this nicelyClient-side and server-side validationProvider for Data Annotations on server-sideAdapters jQuery and MS AJAX on client-side
  • 37. MVC 2.0Separation of ConcernsModel-based ValidationModel RenderingScalability
  • 39. Model TemplatesASP.NET can render model based metadata provided by developersBuilt-in templates for data typesBuilt-in provider for Data AnnotationsData Annotations attributesDisplayName, HiddenInput, DataType, ReadOnly, ScaffoldColumn, DisplayFormat, and UIHint
  • 42. Custom TemplatesMVC is shipped with built-in templatesCan override templates easily
  • 44. MVC 2.0Separation of ConcernsModel-based ValidationModel RenderingScalability
  • 45. Asynchronous ControllerNo blocking-thread during IO/network-bound operation => improved throughputSource: http://msdn.microsoft.com/en-us/library/ee728598%28VS.100%29.aspx
  • 48. OverviewBuilt-in page, entity, field and filter templatesEasy to customize or add new templatesDeclarative validation and renderingIntegrated with ASP.NET Web Forms and MVC applications
  • 51. ASP.NET Web Forms 4.0URL Routinghttp://weblogs.asp.net/scottgu/archive/2009/10/13/url-routing-with-asp-net-4-web-forms-vs-2010-and-net-4-0-series.aspxClient IDshttp://weblogs.asp.net/scottgu/archive/2010/03/30/cleaner-html-markup-with-asp-net-4-web-forms-client-ids-vs-2010-and-net-4-0-series.aspxChart Control http://www.4guysfromrolla.com/articles/072209-1.aspxSEO Improvementshttp://weblogs.asp.net/scottgu/archive/2010/01/05/asp-net-4-seo-improvements-vs-2010-and-net-4-0-series.aspx
  • 52. ASP.NET AJAX 4.0Libraries & source code for Ajax Libraryhttp://ajax.codeplex.comTutorials & sample apps for Ajax Libraryhttp://www.asp.net/ajaxlibraryMicrosoft Ajax CDNhttp://www.asp.net/ajaxLibrary/cdn.ashxMicrosoft Ajax Minifier 4.0http://aspnet.codeplex.com/releases/view/40584
  • 53. ASP.NET MVC 2.0Model validationhttp://weblogs.asp.net/scottgu/archive/2010/01/15/asp-net-mvc-2-model-validation.aspxModel Templateshttp://bradwilson.typepad.com/blog/2009/10/aspnet-mvc-2-templates-part-1-introduction.htmlStrongly-typed Helpershttp://weblogs.asp.net/scottgu/archive/2010/01/10/asp-net-mvc-2-strongly-typed-html-helpers.aspxAreashttp://msdn.microsoft.com/en-us/library/ee671793%28VS.100%29.aspxAsynchronous Controllerhttp://msdn.microsoft.com/en-us/library/ee728598%28VS.100%29.aspx
  • 54. ASP.NET Dynamic DataDynamic Data Presentation Layer Customizationhttp://msdn.microsoft.com/en-us/library/ee211433%28VS.100%29.aspxDynamic Data Schema Customizationhttp://msdn.microsoft.com/en-us/library/ee225428%28v=VS.100%29.aspx

Editor's Notes

  • #9: Global.asax -&gt; Default.aspx -&gt; Songs.aspx
  • #14: ClientID.aspxClientID_Predictable.aspx-&gt;AutoID -&gt; Static -&gt; Predictable
  • #20: Chart.aspx- Switch chart type: Column, Bar, Pie, LineChart_Programmatic.aspxMicrosoft Chart SamplesChart Types / Area Charts / 3D AreaChart Types / Advanced Financial Charts / StockAppearance / 3D PerspectiveInteractivity &amp; Ajax / AJAX / Real Time Chart
  • #26: ClientControls.aspx
  • #28: DataView.aspxDataViewRemote.aspx2_DataContext/1_WCF_SaveChanges.htm
  • #37: RegisterLogon
  • #42: Account/Register.ascxBlogEntry/Entry.ascxAccount/Show.ascx
  • #44: Account/Register.ascxBlogEntry/Entry.ascxAccount/Show.ascx
  • #47: Master.aspxTwitterControllerTweetBox
  • #50: Build from scratch and apply some customizations:1.namespace DynamicData.Models{ [MetadataType(typeof(TrackMetadata))] public partial class Track { } public class TrackMetadata { [StringLength(48)] public string Name { get; set; } [ScaffoldColumn(false)] public bool Bytes { get; set; } }}2.using System;using System.ComponentModel.DataAnnotations;namespace DynamicData.Models{ [MetadataType(typeof(InvoiceMetadata))] public partial class Invoice { } public class InvoiceMetadata { [DisplayFormat(DataFormatString = &quot;{0:yyyy-MM-dd}&quot;)] public DateTimeInvoiceDate { get; set; } }}3.List.aspx move to CustomPages/Tracks