1 / 24

What’s New in Microsoft ASP.NET 4 Web Forms and Dynamic Data

FT58. What’s New in Microsoft ASP.NET 4 Web Forms and Dynamic Data. Scott Hunter Senior Program Manager Lead Microsoft Corporation. ASP.NET 4 Web Forms?. Support for SEO Cleaner HTML Productivity and Extensibility Rich Ajax. We’ll Look At…. URL routing and other SEO improvements

avarielle
Download Presentation

What’s New in Microsoft ASP.NET 4 Web Forms and Dynamic Data

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. FT58 What’s New in Microsoft ASP.NET 4 Web Forms and Dynamic Data Scott Hunter Senior Program Manager Lead Microsoft Corporation

  2. ASP.NET 4 Web Forms? • Support for SEO • Cleaner HTML • Productivity and Extensibility • Rich Ajax

  3. We’ll Look At… • URL routing and other SEO improvements • Cleaner HTML with IDs, view-state, Menu and Login • Adding Dynamic Data to existing apps • QueryExtender improves data scenarios • And make mention to • Improvements in Ajax, core runtime • Chart controls • Visual Studio 2010

  4. ASP.NET 4 Web Forms SEO – URL Routing • Generate clean, logical URLs • Human-readable (‘hackable’) and good for SEO • Handle incoming and outgoing URLs • Define routes in global.asax that map request to resource • Page.RouteDataand <asp:RouteParameter/> Create: /products/dairy/camembert /products/beverages/coke Not: /products.aspx?category=dairy&name=camembert /products.aspx?category=beverages

  5. routes.MapPageRoute( “products-detail”, “products/{category}/{name}”, “~products.aspx”, false, new RouteValueDictionary( {{“category”,“drinks”}, {“name”,”soda”}})); ); <asp:SqlDataSource id=“sqlDataSource1” runat=“server” ..> <selectparameters> <asp:RouteParameter Name=“name” RouteKey=“prodName”/> </selectparamaters> </asp:SqlDataSource> void Page_Load(object sender, EventArgs e) { string name = Page.RouteData.Values[“name”] as string; }

  6. ASP.NET Web FormsSEO – Other improvements • <meta> APIs on Page • Handle redirects • Response.RedirectPermanent(newUrl) • Response.RedirectToRoute(routeName <%@ Page .. MetaDescription=“Listing” MetaKeywords=“products” %> void Page_Load(object sender, EventArgs e) { string c = Page.RouteData.Values[“category”] as string; this.Title = “Contoso“; this.MetaDescription = “Listing for “ + c; this.MetaKeywords = “Contoso, USA, ” + c; }

  7. SEO demo

  8. Web Forms 4Clean HTML • SetcontrolRenderingCompatibilityVersion • 4.0, for new rendering (xHtmlConformance is strict) • Get cleaner HTML through • Extraneous inline styles are removed • Remove outer table rendering on template controls • Semantic HTML (Menu) • Placeholders to control layout in Wizard type controls • And more... • Allows you to defer to CSS and bypass existing style properties <pages controlRenderingCompatibilityVersion="3.5|4.0"/>

  9. Web Forms 4Clean HTML • Ability to handle clientID to improve Ajax and CSS • ClientIDMode=Static, Predictable, Auto, Inherit • ClientIDRowSuffixon data-bound controls • Ability to manage view state more closely • Page|Control.ViewStateMode=Enabled, Disabled Inherit • Disabled on Page, Enabled on specific controls <%@ Page .. ViewStateMode=“Disabled” ClientIDMode=“Static” %> <asp:labelrunat=“server” id=“Label1” ViewStateMode=“Enabled” .. /> <asp:listview.. id=“ListView1” ClientIDRowSuffix=“ProductID”> <itemtemplate> <asp:labelClientIDMode=“Predictable” .. />

  10. Clean HTML demo

  11. ASP.NET Web FormsAjax performance • Improved client performance ASP.NET 4 Refactored libraries to improve performance. Free CDN (includes jQuery and jQuery validation). <asp:ScriptManager .. EnableCdn=“true” /> <script src=“http://ajax.microsoft.com/ajax/jquery/jquery-1.3.2.min.js” type=“text/javascript” />

  12. ASP.NET Web FormsAjax performance, data, and controls • Complimentary to ASP.NET 4 Microsoft Ajax Library Templates and data binding. Data controls. ScriptLoader for loading scripts and dependencies. jQuery support. Ajax Control Toolkit Huge Library of server controls. Improving quality. New controls added..

  13. ASP.NET Web FormsProductivity with dynamic data • Enable dynamic data in existing apps • <asp:GridView/>, <asp:DetailsView/>, <asp:FormView/> <asp:ListView/> • Auto templates and support for validation rules • Customize with dynamic data templates and get scaffolding • Also... • Templates • New entity templates • Templates for filters • New field templates for URL, e-mail, and enumerations • More display options in DisplayAttribute • Many-to-many and inheritance support

  14. ASP.NET Web FormsProductivity with improvements in data • <asp:QueryExtender .. /> • <asp:LinqDataSource/> • <asp:EntityDataSource/> • Declaratively customize your query • Expressions for Search, Range, Property and Custom <asp:QueryExtenderrunat=“server” id=QueryExtender1” TargetControlID=“EntityDataSource1”> <asp:OrderByexpressionDataField=“UnitPrice” Direction=“Ascending” /> <asp:QueryExtender>

  15. ASP.NET Web FormsProductivity with Chart controls • <asp:ChartControl ../> now built-in

  16. Data, Dynamic Data, and Chart demo

  17. ASP.NET 4 WebFormsApp management and security • Output/Object cache provider extensibility • Enable disk-based caching • Integrate with new “Velocity” distributed cache • Ability to pre-load, pre-cache on app start • Monitor per-application performance • Better for multiple apps per domain • Html and Url encoding extensibility • New syntax for automatic Html encoding <%:Message %>

  18. Visual Studio 2010 • ASP.NET project templates • Simplified default web.config • Project templates give you a starter app • JavaScript Intellisense • Much faster and richer library support • XML comments work everywhere • Improved CSS 2.1 support • End to end packaging and deployment of Web apps • Support for databases, SSL certs, file ACLs, etc. Customized configurations

  19. ASP.NET 4 Web FormsSummary • Lots of continued and exciting improvements in ASP.NET 4 Web Forms • URL routing gives you clean, logical URLs • Cleaner HTML helps you target standards • Dynamic data and <asp:QueryExtender/> improves your productivity • Exciting Visual Studio 2010 tooling support not covered here • And, there’s lots more, also not covered here

  20. Resources • Learning more (www.asp.net) • Beta2 Forum: http://forums.asp.net/1213.aspx • ASP.NET 4 Videos: http://www.asp.net/learn/aspnet-4-quick-hit-videos/ • Visual Studio 2010 Videos: • http://www.asp.net/learn/vs2010-quick-hit-videos/ • ASP.NET 4 Beta2 Whitepaper: http://www.asp.net/learn/whitepapers/aspnet4/ • Downloads • Microsoft WebsiteSpark Jump start: http://www.microsoft.com/web/jumpstart/ • Ajax Control Toolkit: http://ajaxcontroltoolkit.codeplex.com/ • Microsoft Ajax Library Previews: http://www.codeplex.com/aspnet • Visual Studio 2010 Beta2: http://www.microsoft.com/visualstudio/en-us/products/2010/default.mspx

  21. YOUR FEEDBACK IS IMPORTANT TO US! Please fill out session evaluation forms online at MicrosoftPDC.com

  22. Learn More On Channel 9 • Expand your PDC experience through Channel 9. • Explore videos, hands-on labs, sample code and demos through the new Channel 9 training courses. channel9.msdn.com/learn Built by Developers for Developers….

More Related