1 / 30

Building Cutting-Edge Web Solutions with Visual Studio 2005 and ASP.NET 2.0

Building Cutting-Edge Web Solutions with Visual Studio 2005 and ASP.NET 2.0. Name Title Microsoft Corporation. New ASP.NET 2.0 Features. Data Controls. Login Controls. Web Parts. Other New Controls. Controls. Master Pages. Themes and Skins. Improved Client Scripting. Compilation

abba
Download Presentation

Building Cutting-Edge Web Solutions with Visual Studio 2005 and ASP.NET 2.0

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. Building Cutting-Edge Web Solutions with Visual Studio 2005 and ASP.NET 2.0 Name Title Microsoft Corporation

  2. New ASP.NET 2.0 Features Data Controls Login Controls Web Parts Other New Controls Controls Master Pages Themes and Skins Improved Client Scripting Compilation & Localization Page Framework Membership Role Management Profiles Configuration Services and APIs Site Maps Health Monitoring Other New Services

  3. Master Pages • Content by inheritance Master Page Content Page

  4. How Master Pages Work • Master pages define common content and content placeholders • Content pages reference masters and fill placeholders with content Site.master default.aspx http://.../default.aspx Content-PlaceHolder Content

  5. Page.Master • New property of System.Web.UI.Page • Provides content pages with programmatic access to master pages • Determine whether page has a master • Access controls defined in master • Access public methods and properties defined in master • Code-level integration of master pages and content pages

  6. Master Pages NameTitle Company

  7. Data Source Controls • Declarative ("no-code") data binding Sql- DataSource Object- DataSource Access- DataSource Xml- DataSource SiteMap- DataSource Data Component Site Map Provider SQL Databases Any Data Access Databases XML Data Site Maps

  8. Data Controls • New data-bound controls • Built-in support for selecting, editing, paging, sorting, and more GridView DetailsView FormView

  9. 2-Way Data Binding • Data controls supply editing UIs • AutoGenerateXxxButton properties • Insert/EditRowStyle properties • Inserting/ed, Updating/ed, Deleting/ed events • Data source controls supply logic • Insert/Update/DeleteCommand properties • Insert/Update/DeleteParameters properties • Inserting/ed, Updating/ed, Deleting/ed events • Visual Studio supplies the glue

  10. Caching • Many data source controls provide built-in caching support • EnableCaching - Enables/disables caching • CacheDuration - Length of time (seconds) • CacheExpirationPolicy - Sliding or absolute • CacheKeyDependency/SqlCacheDepedency - Cache dependencies • No-code data caching!

  11. CacheSync • SQL cache dependencies • Couple cached items to database entities • Change to underlying data evicts corresponding item(s) from cache • Works with SQL Server 7, SQL Server 2000, and SQL Server 2005 • Requires database prep for SQL Server 7 and SQL Server 2000 (Aspnet_regsql.exe) • "Just works" with SQL Server 2005 • Much-requested feature of ASP.NET

  12. Data Access NameTitle Company

  13. Membership Service • Manages users and credentials • Declarative access via Web Site Admin Tool • Programmatic access via Membership API • Vastly simplifies forms authentication • Provides logic for validating user names and passwords, creating accounts, and more • Provides data store for storing credentials, e-mail addresses, and other membership data • Provider-based for flexible data storage

  14. Membership Schema Controls Login LoginStatus LoginView Other Membership API Membership MembershipUser Membership Providers SqlMembershipProvider ActiveDirectory-MembershipProvider Other Providers Membership Data SQL Server Active Directory Other Data Stores

  15. Role Manager • Role-based security in a box • Declarative access via Web Site Admin Tool • Programmatic access via Roles API • Simplifies adding role-based security to sites that employ forms authentication • Maps users to roles on each request • Provides data store for role information • Provider-based for flexible data storage

  16. Role Management Schema Controls Login LoginStatus LoginView Other Role API Roles Role Providers SqlRole-Provider AuthorizationStore-RoleProvider WindowsToken-RoleProvider Other Providers Role Data SQL Server Authorization Manager ("AzMan") Other Data Stores

  17. Login Controls • UI and logic for security-related tasks Login LoginName LoginStatus Membership & Role Management LoginView CreateUser- Wizard Change- Password Password- Recovery

  18. LoginView <asp:LoginView ID="LoginView1" Runat="server"> <AnonymousTemplate> <!-- Content seen by unauthenticated users --> </AnonymousTemplate> <LoggedInTemplate> <!-- Content seen by authenticated users --> </LoggedInTemplate> <RoleGroups> <asp:RoleGroup Roles="Administrators"> <ContentTemplate> <!-- Content seen by administrators --> </ContentTemplate> </asp:RoleGroup> ... </RoleGroups> </asp:LoginView>

  19. Membership and Roles NameTitle Company

  20. Profiles • Store per-user data persistently • Strongly typed access (unlike session state) • On-demand lookup (unlike session state) • Long-lived (unlike session state) • Authenticated and anonymous users • Rich type support (including custom types) • Accessed through dynamically compiled HttpProfileBase derivatives • Provider-based for flexible data storage

  21. Profile Definition <profile> <properties> <!-- String property --> <add name="MyName" /> <!-- Int32 property with default value --> <add name="MyFavoriteNumber" type="System.Int32" defaultValue="0" /> <!-- DateTime property --> <add name="MyBirthday" type="System.DateTime" /> <!-- Custom type; auth. and anon. users --> <add name="MyItems" type="ShoppingCart" serializeAs="binary" allowAnonymous="true" /> </properties> </profile>

  22. Profiles NameTitle Company

  23. Data-Driven Site Navigation • Navigation UIs are tedious to implement • Especially if they rely on client-side script • New controls simplify site navigation • TreeView and Menu - Navigation UI • SiteMapDataSource - XML site maps • SiteMapPath - "Bread crumb" controls • Public site map API provides foundation • Provider-based for flexibility

  24. Site Navigation Schema Controls Menu TreeView SiteMap- DataSource SiteMapPath Site Map API SiteMap SiteMapNode SiteMapNode SiteMapNode Providers XmlSiteMapProvider Other Site Map Providers Site Maps Web.sitemap Other Data Stores

  25. XML Site Map <?xml version="1.0" encoding="utf-8" ?> <siteMap> <siteMapNode> <siteMapNode title="Home" url="~/Default.aspx" /> <siteMapNode title="Tickets" url="~/Tickets.aspx" /> <siteMapNode title="Concert Gear" url="~/Gear.aspx" /> <siteMapNode title="Backstage" url="~/MembersOnly/Backstage.aspx" /> <siteMapNode title="Preferences" url="~/MembersOnly/Preferences.aspx" /> </siteMapNode> </siteMap>

  26. Security Trimming • Feature of site map providers • Varies navigation UI based on roles <?xml version="1.0" encoding="utf-8" ?> <siteMap> <siteMapNode roles="*"> <siteMapNode title="Home" url="~/Default.aspx" /> <siteMapNode title="Tickets" url="~/Tickets.aspx" /> <siteMapNode title="Concert Gear" url="~/Gear.aspx" /> <siteMapNode title="Backstage" roles="Members" url="~/MembersOnly/Backstage.aspx" /> <siteMapNode title="Preferences" roles="Members" url="~/MembersOnly/Preferences.aspx" /> </siteMapNode> </siteMap>

  27. Site Navigation NameTitle Company

  28. VSIP Partners

  29. © 2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

More Related