Visual Studio 2010 and .NET Framework 4 Training Workshop
Jan 24, 2016
Visual Studio 2010and
.NET Framework 4
Training Workshop
Visual Studio 2010and
.NET Framework 4
Training Workshop
What’s New InASP.NET Web Forms 4
What’s New InASP.NET Web Forms 4
NameTitleOrganizationEmail
ObjectivesObjectives
• How is client-side development made easier?
• How can I achieve more control over my application?
• How are the existing server controls enhanced?
Client IDClient ID
1) Master Page (No ID)
2) User Control (“HeaderForm”)
ControlHierarchy
3) Drop Down List (“States”)
Resulting Client IDs:1) ctl002) ctl00_HeaderForm3) ctl00_HeaderForm_States
ViewState ModeViewState ModeIf you do this…
Then neither this…
Nor this…
Will work
Client IDViewState ModeClient IDViewState Mode
RoutingRouting
Request:Products/Bikes
ASP.NET Routing
Route:Product/{name} -> Product.aspx
WebForms Page
File Name:Product.aspx
Route Values:Name = “Bikes”
Response
RoutingRouting
QueryExtenderQueryExtender
LINQ To SQLData Source
EntityData Source
1) Uses arbitrary language2) Difficult to extend
1) Uses Entity SQL2) Difficult to extend
QueryExtender
1) Uses Parameters2) Very easy to perform advanced queries
What investments have been made to the existing controls?
Misc Control EnhancementsMisc Control Enhancements
1) FormViewa) Can remove superflous <table>
2) GridView a) Allows styling of header columns when sortedb) Works without ViewStatec) Supports persisted selection
3) ListViewd) No longer requires a LayoutTemplatee) Supports persisted selection
Misc Control Enhancements (cont.)Misc Control Enhancements (cont.)
1) CompareValidatora) Supports Time and DateTime
2) LinqDataSourceb) Allows you to write queries using LINQ
3) DataPagerc) Works with GridView, DetailsView, and FormView
QueryExtenderControl EnhancementsQueryExtenderControl Enhancements
SummarySummary
• The new client ID and ViewState mode features give you better control over your application
• Routing integration allows you to easily customize your sitemap
• New server control enhancements make leveraging the existing control suite easier