1 / 28

New Features in ASP.NET 4 WebForms

New Features in ASP.NET 4 WebForms. Wallace B. McClure Scalable Development, Inc. http://morewally.com/ MVP, Author, INETA, ASPInsiders Twitter: @ wbm. Where Have We Been?. Static Web Pages. Display Logic Embedded in CGI. IDC/HTX. Active Server Pages. Load-n-go.

geoff
Download Presentation

New Features in ASP.NET 4 WebForms

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. New Features in ASP.NET 4 WebForms Wallace B. McClure Scalable Development, Inc. http://morewally.com/ MVP, Author, INETA, ASPInsiders Twitter: @wbm

  2. Where Have We Been? • Static Web Pages. • Display Logic Embedded in CGI. • IDC/HTX. • Active Server Pages. • Load-n-go. • Markup and Code intertwined. • Tools caused problems. • ASP.NET 1.0. • ASP.NET MVC. • ASP.NET Web Pages. • ASP.NET Evolution.

  3. High Level WebForms • Introduced with ASP.NET 1.0. • Controls with advanced functionality. • Abstracted away HTML knowledge. • Separated Designers and Developers. • Events. • Advanced Tools. • ASP.NET Pillar.

  4. WebForms & MVC & WebMatrix/Razor • All apps != Same requirements. • WebForms Positives • HTML for us. • Mature. • Control Ecosystem. • Postback. • ViewState. • WebForms Negatives • ViewState. • Postback. • Page Lifecycle. “Bad Developers write Bad Applications”

  5. Agenda - What’s New? • Client IDs. • Routing Improvements. • ViewState. • CSS/HTML Improvements. • Charting. • Code Expressions. • Web.config changes. • Control changes. • New VS Project Template.

  6. Client IDs • Unique IDs for client side programming. • IDs not client-side logical. • ClientIDMode • AutoID. • Static. • Predictable / ClientIDRowSuffix. • Inherit. • Set at: • Control. • Container. • Page. • Application.

  7. ClientIDs – Data-Bound Controls • ClientIDRowSuffix. • Controls. • GridView. • ListView. • Repeater.

  8. Higher Search Engine Results with Routing • Human Readable Urls. • Search Engine Optimization. • Introduced with ASP.NET 3.5 SP1. • Not talked about much. • Not intuitive to implement. • Enhanced in ASP.NET 4.0. • ASP.NET Membership. • Events.aspx?State=WA&City=RedmondorEvents/WA/Redmond

  9. New Routing Features • Easier to implement. • PageRouteHandler class. • Page.RouteData. • Expressions. • Building a URL. • Getting data.

  10. Search Engine Optimization with Meta Tags • Page.MetaKeywords. • Page.MetaDescription. • getters/setters.

  11. Route Information in Markup • Expressions. • Building Urls. • Easily build Routes • Doesn’t depend on Route in Markup. • Retrieve Route Information. • Retrieve Route Information in Markup. • Doesn’t require code in Code behind.

  12. ViewState Weight Loss • Mechanism to store state between http calls. • Control Events. • “__ViewState” hidden field. • Stores various types. • On by default for all controls • Can grow large. • Strategies. • Store on the Server. • Disable by default & only enable for controls that require it.

  13. ViewStateMode • Enabled. • Disabled. • Inherit. • Strategy: • Continue to run as is. • Disable by default. • Only enable for the necessary controls.

  14. CSS Improvements • Different HTML/CSS environment. • What is standard? • New style rendering – 4.0. • xhtml strict. • non-input controls and invalid styles. • div styling on system controls. • Menu, validation, border=“0” • Legacy rendering – 3.5.

  15. Outer Table for Templated Controls • <table>, <tr>, <td> by default. • Unexpected tags. • .RenderOuterTable to remove the <table>

  16. HTML Encoding • <%= “expression”%> - Not HTML Encoded. • <%= HttpUtility.HtmlEncode(“expression”)%> • New Code Expression in ASP.NET 4. • <%: “expression”%> - HTML Encoded. • Cross Site Scripting

  17. Persisted Row Selection • DataBound Controls. • GridView. • ListView. • Page through results. • .EnablePersistedSelection.

  18. Pictures are worth 1000 words with the Charting Control • .NET 3.5 SP1 addin. • Configurable. • .NET 4. • Chart Types. • Areas, Titles, legends, and annotations. • 3-D Support. • Log scaling. • Financial and statistical formula support. • Dates, Times, Currency.

  19. Drilling into Data • DataPoint .Url property. • Chart’sOnClick event.PostBackValue.

  20. What’s on the Menu? - asp:Menu • .NET 3.5 Menu. • Tables output. • How compliant? • ASP.NET 3.5 SP1 Hotfix for IE8. • .NET 4.0 Menu. • UL/LI output.

  21. Get started with new Project Templates • Problem • How do you start? • By programmers, for programmers ( == Ugly ). • New Templates • More. • Not ugly.

  22. Control Improvements • New agreement on HTML Standards. • Control rendering setting. • Disabled non-input controls. • System hidden fields. • ListView – Layout template not required. • CheckBoxList & RadioButtonList. • Layout – Flow / Table. • RepeatLayout – OrderedList (ol) / UnorderedList (ul) • Wizard & CreateUserWizard. • Fuller control over layout. • LayoutTempate.

  23. Web.config goes on a Diet • Grown. • Ajax. • Routing. • IIS7. • Tools to Manage. • Minimized in .NET 4.

  24. Data source controls • LINQ / Entity Framework. • QueryExtender. • User controls to queries. • Filter. • Range. • PropertyExpression. • CustomExpression.

  25. AJAX Changes • Server side apis. • Control Toolkit updated. • Client side  jQuery. • Content Delivery Network (CDN). • Scripts broken up for debugging.

  26. Browser Capabilities • New browsers. • iPhone. • Blackberry. • Chrome. • New plugin provider. • Derive from HttpCapabilitiesProvider. • Register in web/machine.config. • Load on Application_Start.

  27. Other Improvements for ASP.NET / IIS • Auto-Start Web Apps. • Permanent Redirect. • Compressed Session State. • Allowable Urls. • Valid URL characters – Custom Validation. • New Caching Assembly. • App monitoring within a domain.

  28. Questions? • Where can I learn more? • http://asp.net /ajax. • http://asp.net/web-forms. • http://aspnetpodcast.com. • http://morewally.com.

More Related