Visual Studio 2010尝鲜
先来个VS2010的界面:
新的语法:
ASP.NET 4.0的新东西:
Web forms
clientIDs,
Can be managed
CSS
Support none-table-based html rendering
Non-inlien style attributes
Accessibility
URL routing for web forms
Friendly-URL handling
Route-aware controls
Configuration model for url routing
Viewstate
Disable on page, enable on specific controls
Disalble on ctonrl, enable on child viewsate
Gridview/listview work better without viewsate
Asp.net dynamic data
Asp.net core
Cache extensibility and performance
Enable cache products like velocity as plug-in as a cache provider
Enhance asp.net session state APIs
Potentially move cache to new NS/DLL
Scalability
Ngen option server side
Security
RFC2396 urls to be used in asp.net
New CAS model
Asp.net ajax 4
· Template
TRANSFORM DATA TO UI
· Bindings
· Declarative instantiation
· Data
· CSS Selectors
· Core Improvement
Template, one way one time
<div id="yourname">
<fieldSet>
<legend>{{FirstName}}</legend>
JS
Var p=$crete(Sys.Ui.DataView,,,,$get("yourname")
p.set_data(yourdataresurles)
Dynamic data overview
<GenerateImage handler="~/myhandler.ashx" />
Presentation use MVC, data use the Entity framework
Data validation model, just add one attribute
Public class product{
[ScaffoldingColum(false)]
[Range(0,50)]
Public object ItemsInstock{get;set;}
}
UI Customization
Page Template
Field template
Uihint/Datatype on model
Custom pages
Demo
Add one datafiledtemplate
Display the int use a silider control
Legacypage
Register a dyanamicdatamanager
Add the dynamicField
V1 ships with 3.5 sp1
2 ships with .net 4.0
C# 4 and VB 10
Optional parameters