Asp.net web forms new shiny things part 1
description
Transcript of Asp.net web forms new shiny things part 1
ASP.NET Webforms – New Shiny ThingsPART 1
About Me
Lohith G N
Developer Evangelist, Telerik
Microsoft MVP – ASP.NET/IIS (2012/13)
BDotNet
@kashyapa
About.me/kashyapa
Agenda
Version recap
WebForms New Things
Typed Data
Binding
Model Binding
Value Providers
timeline
1.0
Feb 2002
Original
VS.NET
1.1
Apr 2003
First Update
VS.NET 2K3
2.0
Nov 2005
F/W Rewrite
VS.NET 2K5
3.0
Nov 2006
WCF, WPF, WF
Blend
3.5
Nov 2007
LINQ
VS.NET 2K8
4.0
Apr 2010
Parallel
VS.NET 2K10
4.5
Aug 2012
Async
VS.NET 2K12
ASP.NET WebForms – New Shiny Things
Typed Data Binding
Model Binding
Value Providers
Data Annontations for Validation
Unobtrusive client-side Validation
Granular Request Validation
Async Page Processing
Bundling & Minification
Page Inspector
Typed Data BindingSTRONGLY TYPES DATA BINDING EXPRESSIONS
Data Binding – Till Now
Old School - Bind() and Eval()
Uses Reflection
No IntelliSense
No Compile Time Checking
Trivia – where can we find these methods in the F/W ???
DemoData Binding Old School
Typed Data Binding
Controls expose ItemType property
Use Item for one way binding
Use BindItem for TwoWay binding
Intellisense Support
Go To Definition
Compile Time Checking
DemoStrongly Typed Data Binding
Model BindingMODEL BINDING IN WEBFORMS
Data Binding - Old School
Manual Handling of CRUD
Cannot do Validation using Annotations
Bloated code behind
DemoHandling CRUD Data Binding
Model Binding – New School
bind value submitted from client to a model on the server
Benefits Rich Controls Support – all data controls support
Validation – Annotated Models
Extensible
Value Providers Form, Control, QueryString, Cookie, Profile, RouteData, Session
DemoValue Providers
Q&A
Summary
Strongly Type Data Binding Expression in Data Controls
Model Binding
ItemType Property on Data Controls
Select/Update/Insert/Delete Method
Value Providers
Form, Control, QueryString, Cookie, Profile, RouteData, Session
Thank You@kashyapa
http://kashyapas.com
http://About.me/kashyapa