SlideShare una empresa de Scribd logo
1 de 22
Descargar para leer sin conexión
ASP.NET 2.0 and Visual
                               Studio 2005 Overview

                               Paul Litwin
                               Collaborative Data Services,
                               Public Health Sciences,
                               Fred Hutchinson Cancer Research Center
                               cds.fhcrc.org
                               plitwin@fhcrc.org




                 New Features at a Glance
          Framework Controls




                                    Data               Login                                   Other New
                                                                          Web Parts
                                   Controls           Controls                                  Controls



                                                       Themes            Mobility and
             Page




                                 Master Pages                                                  Compilation
                                                      and Skins          Localization



                                                        Role
                                 Membership                                   Profiles        Configuration
          and APIs
          Services




                                                     Management


                                              Site                Health                  Other
                                              Maps               Monitoring              Services


                                     © 2002-2005 Deep Training/Litwin Consulting, Inc.                     2




                                                IDE Changes




                                     © 2002-2005 Deep Training/Litwin Consulting, Inc.                     3




©2002-2005 Deep Training/Litwin Consulting, Inc. All Rights Reserved Worldwide. Unauthorized duplication is strictly prohibited.

                                                                                                               Page 1
Getting Started with VS 2005
            u   No need to create a project
            u   Instead create a new Web Site




            u   Web sites can be
                file-system based
                file-

                      © 2002-2005 Deep Training/Litwin Consulting, Inc.   4




            VS 2005 Highlights (1 of 6)
            u   Editor doesn’t reformat HTML unless you
                        doesn’
                ask it to!
            u   Selection preserved when switching
                between Design and Source (HTML)
                views
            u   Can now validate HTML against
                additional browsers and XHTML
            u   Edit and Continue is reborn!


                      © 2002-2005 Deep Training/Litwin Consulting, Inc.   5




            VS 2005 Highlights (2 of 6)
            u   Code-
                Code-behind and inline code are equal
                citizens
                l   Full support for IntelliSense for both styles
                l   Choose your style in Add New Item dialog
            u   Source changes tracked in margin
                l   Unsaved changes in yellow
                l   Recently saved changes in green




                      © 2002-2005 Deep Training/Litwin Consulting, Inc.   6




©2002-2005 Deep Training/Litwin Consulting, Inc. All Rights Reserved Worldwide. Unauthorized duplication is strictly prohibited.

                                                                              Page 2
VS 2005 Highlights (3 of 6)
            u   IntelliSense works everywhere
                l   HTML
                l   Code
                l   Page directives
                l   Web.config
                l   Design view
                    n Technically these are smart tags




                         © 2002-2005 Deep Training/Litwin Consulting, Inc.   7




            VS 2005 Highlights (4 of 6)
            u   Speaking of Config Files
                l    Three ways to edit settings
                    1. Use IntelliSense within web.config file
                    2. Select ASP.NET tab inside of IIS Admin
                       application, click Edit Configuration btn
                          n    Extensive control of web.config settings
                    3.      Select Website | ASP.NET Configuration
                          n    Not as complete as IIS Admin tool
                          n    Includes Security Setup wizard
                          n    Works with non-IIS sites
                                          non-

                         © 2002-2005 Deep Training/Litwin Consulting, Inc.   8




            VS 2005 Highlights (5 of 6)
            u   Creating event handlers now consistent
                across languages (VB or C#)
                l   Can do it from property sheet
                    for both languages
            u   Moving windows easier
                l   Thanks to window guides
            u   Toolbox categorizes controls



                         © 2002-2005 Deep Training/Litwin Consulting, Inc.   9




©2002-2005 Deep Training/Litwin Consulting, Inc. All Rights Reserved Worldwide. Unauthorized duplication is strictly prohibited.

                                                                                 Page 3
VS 2005 Highlights (6 of 6)
            u    VS ships with personal Web server
                  l      No need to create a virtual root
                  l      Next version of Cassini Web server
            u    Lots of ways to connect to a site




                           © 2002-2005 Deep Training/Litwin Consulting, Inc.           10




            And Did I Mention…
                      Mention…
            u    Express Editions
                  l      low -cost entry point for enthusiast/hobbyist/part-
                                                   enthusiast/hobbyist/part-
                         time dev
            u    Team System
                  l      An expanded version of VS that speaks to the
                         whole design/development/testing life- cycle
                                                             life-
                          n client/server, collaboration based

                          n robust/scalable source control

                          n work item (e.g., bugs) tracking

                          n unit testing, load testing

                          n code analysis

                          n project portal

                          n lots more …

                           © 2002-2005 Deep Training/Litwin Consulting, Inc.           11




            Expanding Visual Studio
                                  Evaluate               Interact with
                                   .NET                    students

          Learn how                                                              Build cool
          to program                                                               apps




             Hobbyists
                                                                               Enthusiasts

                           © 2002-2005 Deep Training/Litwin Consulting, Inc.           12
                                     Students             Faculty




©2002-2005 Deep Training/Litwin Consulting, Inc. All Rights Reserved Worldwide. Unauthorized duplication is strictly prohibited.

                                                                                              Page 4
Expanding Visual Studio


                                              Developer              Tester
                                                                                       Project
                                             VSTE/SD           VSTE/ST                 Manager
                           Application
                                                                                        Team Explorer
                            Architect




          Infrastructure           VSTE/SA
             Architect

                                                            Team Foundation Server

                                                              Source           Build
                                                              Control         Server
             Users &       Web Browser
           Management                                     Project                  Work
                                                          Portal                   Items
                                                                    Reporting
                            © 2002-2005 Deep Training/Litwin & Analytics
                                                             Consulting, Inc.                13




            Visual Studio 2005
            “Personalized productivity ”


                                                                                          Testers

                                                                                        Architects

                                                                                   Enterprise Devs
                                                                                       Consultants

                                                                                       Professionals

                                                                                         VB6 Devs
                                                                                        Part-Timers

                                                                                        Hobbyists
                                                                                         Students

                                                                                       Enthusiasts
                            © 2002-2005 Deep Training/Litwin Consulting, Inc.                14




                                         Data Controls




                            © 2002-2005 Deep Training/Litwin Consulting, Inc.                15




©2002-2005 Deep Training/Litwin Consulting, Inc. All Rights Reserved Worldwide. Unauthorized duplication is strictly prohibited.

                                                                                                        Page 5
Binding Data to Controls
            u   ASP.NET 1.x supported rich 1-way
                                              1-
                binding syntax but you still had to write
                quite a bit of code to get data in and out
                of controls
            u   ASP.NET 2.0 supports two-way
                                        two-
                (read/write) binding with no code in
                many situations




                      © 2002-2005 Deep Training/Litwin Consulting, Inc.   16




            Data Source Control
            u   A family of controls that assist in data
                binding
                l   Middleman between data bound controls
                    and data sources
            u   Types of Data Source Controls
                l   Tabular                       l   Hierarchical
                    n SqlDataSource                   n XmlDataSource

                    n AccessDataSource                n SiteMapDataSource

                    n ObjectDataSource



                      © 2002-2005 Deep Training/Litwin Consulting, Inc.   17




            New 2.0 Data-Bound Controls
                    Data-
            u   List Controls
                l   BulletedList
            u   Composite Controls
                l   GridView
                l   DetailsView
                l   FormView
            u   Hierarchical Controls
                l   TreeView
                l   Menu

                      © 2002-2005 Deep Training/Litwin Consulting, Inc.   18




©2002-2005 Deep Training/Litwin Consulting, Inc. All Rights Reserved Worldwide. Unauthorized duplication is strictly prohibited.

                                                                               Page 6
GridView Control
           Example: GridView.aspx
            u A “code - less ” DataGrid
                 code-less”
            u Walk- through of grid with automatic
              Walk-
              sorting (ascending & descending),
              pagination
                1.    Add GridView to page
                2.    Using GridView Tasks pane, choose
                      DataSource
                3.    Check EnablePaging & EnableSorting



                         © 2002-2005 Deep Training/Litwin Consulting, Inc.   19




            GridView with Updating
            Example: GridViewUpdate1.aspx
            u Can also be done without code
                1.    Add GridView to page
                2.    Choose Data Source
                     l      On quot;Configure the select statementquot; page
                          l    Click Advanced Options
                          l    Check “ Generate Insert, Update, and Delete
                               statements”
                               statements”
                3.    Configure GridView
                     l      Check “ Enable Editing” and/or Enable Deleting
                                           Editing”



                         © 2002-2005 Deep Training/Litwin Consulting, Inc.   20




          The Single-Record Form Problem
              Single-
            u   ASP.NET 1.x provided no help to the
                developer having to create a single -record
                                             single-
                “form” view of data
                 form”
            u   ASP.NET 2.0 gives us two solutions
                l    DetailsView – fixed look (supports styles but no
                     field templates); can't get at individual fields
                l    FormView – fully templated (VS will generate basic
                     template for you); will work with validation controls
            u   Both support editing, pagination



                         © 2002-2005 Deep Training/Litwin Consulting, Inc.   21




©2002-2005 Deep Training/Litwin Consulting, Inc. All Rights Reserved Worldwide. Unauthorized duplication is strictly prohibited.

                                                                                  Page 7
FormView vs. DetailsView
            Controls




                         © 2002-2005 Deep Training/Litwin Consulting, Inc.   22




             Master Pages and Navigation




                         © 2002-2005 Deep Training/Litwin Consulting, Inc.   23




            Navigation
            u   Three Pieces
                1.   Navigation SiteMap
                     n Web.sitemap XML file
                     n      Allows you to create a sitemap for navigation
                            purposes
                2.   SiteMapDataSource
                     n  Reads Web.sitemap file and makes available
                        to TreeView control
                3.   Controls
                     n TreeView – displays navigation tree
                     n      Menu – displays flyout menus
                     n      SiteMapPath – quot;breadcrumbquot; path
                         © 2002-2005 Deep Training/Litwin Consulting, Inc.   24




©2002-2005 Deep Training/Litwin Consulting, Inc. All Rights Reserved Worldwide. Unauthorized duplication is strictly prohibited.

                                                                                  Page 8
Master Pages
            u   Major shortcoming of ASP.NET 1.x: lack
                of any easy way to create page
                templates that other pages can inherit
            u   Enter ASP.NET 2.0 Master Pages
                l   Easy and powerful way to create a common
                    layout for all (or a subset of) pages in site
                l   Support for multiple levels of master pages
                l   WYSIWYG support for master pages in
                    Visual Studio


                      © 2002-2005 Deep Training/Litwin Consulting, Inc.   25




            Mastering Master Pages
            u   Arrange content on master page
                (.master extension)
                l   Add placeholders for content pages using
                    the ContentPlaceHolder element
            u   Create pages based on master page
                l   Use MasterPageFile attribute in page
                    directive
                l   Add content to Content element



                      © 2002-2005 Deep Training/Litwin Consulting, Inc.   26




             Master Pages Demo




                      © 2002-2005 Deep Training/Litwin Consulting, Inc.   27




©2002-2005 Deep Training/Litwin Consulting, Inc. All Rights Reserved Worldwide. Unauthorized duplication is strictly prohibited.

                                                                               Page 9
Login Controls and Security




                      © 2002-2005 Deep Training/Litwin Consulting, Inc.   28




            New Security Parts (1 of 2)
            u   Forms Authentication
                l   Cookieless authentication now supported
            u   Login Controls
                l   UI controls for managing login of users
            u   Membership
                l   Standardized solution for storing forms
                    authentication data
                l   Membership.ValidateUser method
                l   Login controls wrap up membership service
                l   Provider-
                    Provider-based
                      © 2002-2005 Deep Training/Litwin Consulting, Inc.   29




            New Security Parts (2 of 2)
            u   Role Management
                l   Simplifies authorization code you have to
                    write
                l   Provider-
                    Provider-based
            u   Personalization
                l   Simplifies storing of site personalization
                    data in user profiles
                l   Support for strongly -typed profile properties
                                 strongly-
                l   Provider-
                    Provider-based


                      © 2002-2005 Deep Training/Litwin Consulting, Inc.   30




©2002-2005 Deep Training/Litwin Consulting, Inc. All Rights Reserved Worldwide. Unauthorized duplication is strictly prohibited.

                                                                               Page 10
New Features at a Glance
          Framework Controls




                                   Data               Login                                   Other New
                                                                         Web Parts
                                  Controls           Controls                                  Controls



                                                      Themes            Mobility and
             Page




                                Master Pages                                                  Compilation
                                                     and Skins          Localization



                                                       Role
                                Membership                                   Profiles        Configuration
          and APIs
          Services




                                                    Management


                                             Site                Health                  Other
                                             Maps               Monitoring              Services


                                     © 2002-2005 Deep Training/Litwin Consulting, Inc.                 31




                 Forms Authentication
          <authentication mode=quot;Formsquot;>
            <forms name=quot;namequot;
              cookieless=UseCookie|UseUri|AutoDetect|
                         UseDeviceProfile
              defaultUrl=[URL]
              domain=domain name
              loginUrl=quot;urlquot;
              protection=quot; All |None|Encryption|Validationquot;
              timeout=quot;30quot;
              path=quot;/quot;
              requireSSL=quot;true| false quot;
              slidingExpiration=quot;true|false quot;>
            </forms>
          </authentication>



                                     © 2002-2005 Deep Training/Litwin Consulting, Inc.                 32




                 Using Security Setup Wizard
                  u            Walks you through
                               setting up
                               authentication,
                               membership
                               provider, users, and
                               role management
                               for Web site
                  u            Can setup Forms or
                               Windows auth
                  u            Start wizard from
                               Web Site Admin
                               Tool (Website |
                               ASP.NET Configuration)


                                     © 2002-2005 Deep Training/Litwin Consulting, Inc.                 33




©2002-2005 Deep Training/Litwin Consulting, Inc. All Rights Reserved Worldwide. Unauthorized duplication is strictly prohibited.

                                                                                                             Page 11
Login Controls
            u   Login – log in users (goes on login page)
            u   LoginView – displays different views
                based on whether user is authenticated
            u   PasswordRecovery – recover or reset
                lost password
            u   LoginStatus – displays login or logout
                link
            u   LoginName – displays login name for
                authenticated users
            u   CreateUserWizard – steps user through
                wizard to create new account
            u   ChangePassword – changes password
                for user




                      © 2002-2005 Deep Training/Litwin Consulting, Inc.   34




             Login Controls Demo




                      © 2002-2005 Deep Training/Litwin Consulting, Inc.   35




            Membership Service
            u   Saves you from having to manage users and
                passwords
            u   Login controls may obviate need to directly work with
                the classes in many cases
            u   Choice of providers (SQL Server, Access, etc.)
            u   Example Uses
                l   Authenticate User
                     n Membership.ValidateUser()

                l   Find User by Email address
                     n Membership.FindUsersByEmail()

                l   Estimate number of users online
                     n Membership.GetNumberOfUsersOnline()




                      © 2002-2005 Deep Training/Litwin Consulting, Inc.   36




©2002-2005 Deep Training/Litwin Consulting, Inc. All Rights Reserved Worldwide. Unauthorized duplication is strictly prohibited.

                                                                               Page 12
Role Service
            u   Simplifies authorization using roles
            u   Manage roles at design time using ASP.NET
                Web Admin tool
                l   Or use Roles and RoleProvider classes at runtime
            u   Use LoginView control to display custom
                content per role
                l   Order RoleGroup elements from highest to lowest
                    precedence (e.g., Admin first, etc.)
            u   Or use User.IsInRole() method from code



                      © 2002-2005 Deep Training/Litwin Consulting, Inc.   37




            Role Service
            u   Role data carried between pages by ASP.NET
                using encrypted cookies
            u   Reduces round-trips to database for role
                         round-
                information




                      © 2002-2005 Deep Training/Litwin Consulting, Inc.   38




            LoginView Roles Example
            LoginView.aspx
           <asp:LoginView ID=quot;lvRolesquot; Runat=quot;serverquot;>
            <RoleGroups>
              <asp:RoleGroup Roles=quot;Adminsquot;><ContentTemplate>
              This message prints for members of the Admins group.
              </ContentTemplate>
              </asp:RoleGroup>
              <asp:RoleGroup Roles=quot;Managersquot;><ContentTemplate>
              This message prints for members of the Managers
              group.
              </ContentTemplate>
              </asp:RoleGroup>
              <asp:RoleGroup Roles=quot;Usersquot;><ContentTemplate>
              This message prints for members of the Users group.
              </ContentTemplate>
              </asp:RoleGroup>
            </RoleGroups>
           </asp:LoginView>
                      © 2002-2005 Deep Training/Litwin Consulting, Inc.   39




©2002-2005 Deep Training/Litwin Consulting, Inc. All Rights Reserved Worldwide. Unauthorized duplication is strictly prohibited.

                                                                               Page 13
IsInRole Roles Example
            Roles.aspx.cs
           protected void Page_Load (…)
               {
               // Order by highest to lowest
               if (User.IsInRole(quot;Developers quot;))
                   lblRole.Text = quot;Developer. You rule!quot;;
               else if (User.IsInRole(quot;Managers quot;))
                   lblRole.Text = quot;Manager. So?quot;;
               else if (User.IsInRole(quot;Users quot;))
                   lblRole.Text = quot;Lowly userquot;;
                 else
                   lblRole.Text = quot;Not logged in.quot;;
           }


                    © 2002-2005 Deep Training/Litwin Consulting, Inc.   40




            Personalization Service
            u   No need to create fields in a database to
                keep track of personalization data
            u   Allows you to strongly type your
                personalization data
            u   You maintain personalization data in
                user profiles




                    © 2002-2005 Deep Training/Litwin Consulting, Inc.   41




            Creating a Profile

          <profile
          defaultProvider=quot;AspNetSqlProviderquot;>
            <properties>
              <add name=quot;sexquot; type=quot;System.Stringquot;/>
              <add name=quot;agequot; type=quot;System.Int32quot; />
              <add name=quot;colorquot;
               type=quot;System.Stringquot;/>
              <add name=quot;birthdatequot;
               type=quot;System.DateTimequot; />
            </properties>
          </profile>

                    © 2002-2005 Deep Training/Litwin Consulting, Inc.   42




©2002-2005 Deep Training/Litwin Consulting, Inc. All Rights Reserved Worldwide. Unauthorized duplication is strictly prohibited.

                                                                             Page 14
Reading/Writing Profile Data
            Profiles.aspx


          protected void cmdSave_Click(…)
          {
              Profile.sex = txtSex.Text;
          }
          protected void cmdGet_Click(…)
          {
              txtSex.Text = (string)Profile.sex;
          }

                    © 2002-2005 Deep Training/Litwin Consulting, Inc.   43




            Personalization Profiles
            u   Especially useful for customizing…
                                      customizing…
                l Themes
                l Web Parts




                    © 2002-2005 Deep Training/Litwin Consulting, Inc.   44




             Themes and Skins




                    © 2002-2005 Deep Training/Litwin Consulting, Inc.   45




©2002-2005 Deep Training/Litwin Consulting, Inc. All Rights Reserved Worldwide. Unauthorized duplication is strictly prohibited.

                                                                             Page 15
Themes & Skins
            u   Theme
                l   Collection of property settings (skins) that
                    allow you to define a standard look of
                    pages and controls
            u   Skin
                l   Set of visual attributes applied to a control




                      © 2002-2005 Deep Training/Litwin Consulting, Inc.   46




            What's Themable?
            u   Properties that control appearance
            u   Does not include content or behavior
                attributes such as AllowPaging,
                AutoPostback




                      © 2002-2005 Deep Training/Litwin Consulting, Inc.   47




            Creating a Theme – Basics
            u   Create folder under your site's Themes
                folder
            u   Theme name is derived from folder
                name
            u   Theme folder may contain .skin, .css,
                and image files




                      © 2002-2005 Deep Training/Litwin Consulting, Inc.   48




©2002-2005 Deep Training/Litwin Consulting, Inc. All Rights Reserved Worldwide. Unauthorized duplication is strictly prohibited.

                                                                               Page 16
Creating a Theme – Steps
            1.   Add theme folder to app using Add Folder|Theme
                 folder
            2.   Add . aspx page to theme folder.
                     .aspx
            3.   Add controls to page
            4.   Customize the look of the controls
            5.   Remove ID attribute and any attributes that you do
                 not want to be part of theme (e.g., Text)
            6.   Add SkinID attribute to any control to create alternate
                 skins
            7.   Remove all non-control content from file
                            non-
            8.   Rename file to .skin extension


                       © 2002-2005 Deep Training/Litwin Consulting, Inc.   49




            Applying Themes
            u    Add attribute to Page directive of page
                 l   Theme attribute
                      n Theme settings override any local settings

                 l   StyleSheetTheme attribute
                      n Local settings override theme settings

                 l   Themes can also be applied programmatically in
                     the Page_PreInit event by setting the Page's
                     Theme or StyleSheetTheme property
            u    Reference SkinIDs when appropriate to get
                 alternate skin for control


                       © 2002-2005 Deep Training/Litwin Consulting, Inc.   50




            Theme & Skin Example
            AdditionalTopics/ThemedSite/Themes




                       © 2002-2005 Deep Training/Litwin Consulting, Inc.   51




©2002-2005 Deep Training/Litwin Consulting, Inc. All Rights Reserved Worldwide. Unauthorized duplication is strictly prohibited.

                                                                                Page 17
Theme & Skin Example
            Pumpkin
            Pumpkin Orange.skin

           <asp:Label Runat=quot;serverquot; ForeColor=quot;Orangequot;
           Font-Names=quot;Comic Sans MSquot;></asp:Label>
           <asp:TextBox Runat=quot;serverquot; ForeColor=quot;Orangequot;
           Font-Names=quot;Comic Sans MSquot;></asp:TextBox>
           <asp:Button Runat=quot;serverquot; ForeColor=quot;Orangequot;
           Font-Names=quot;Comic Sans MSquot; />
           …

           <asp:Label SkinId=quot;Reversequot; Runat=quot;serverquot;
           ForeColor=quot;Whitequot; BackColor=quot;DarkOrangequot; Font-
           Names=quot;Comic Sans MSquot; ></asp:Label>
           <asp:TextBox SkinId=quot;Reversequot; Runat=quot;serverquot;
           ForeColor=quot;Whitequot; BackColor=quot;DarkOrangequot; Font-
           Names=quot;Comic Sans MSquot;></asp:TextBox>


                    © 2002-2005 Deep Training/Litwin Consulting, Inc.   52




            Theme & Skin Example
            ThemedPage.aspx

            <%@ Page Language=quot;VBquot;
            Theme=quot;Pumpkinquot; ... %>
            …
            <asp:TextBox
            SkinID=quot;Reversequot; ID=quot;txtAgequot;
            Runat=quot;serverquot; Width=quot;63pxquot;
            Height=quot;22pxquot;>

                    © 2002-2005 Deep Training/Litwin Consulting, Inc.   53




            Themes
            u   Can also be set dynamically from code
            u   Need to set theme in Page_PreInit event




                    © 2002-2005 Deep Training/Litwin Consulting, Inc.   54




©2002-2005 Deep Training/Litwin Consulting, Inc. All Rights Reserved Worldwide. Unauthorized duplication is strictly prohibited.

                                                                             Page 18
Other Topics
            u   Caching Enhancements
            u   Cross-
                Cross-Page Posting
            u   Compilation Improvements
            u   Validation Groups




                      © 2002-2005 Deep Training/Litwin Consulting, Inc.   55




            Caching Dependencies
            u   Work with SQL Server 7/2000
                l   Works by ASP.NET polling database
            u   Work even better with SQL Server 2005
                l   No polling necessary




                      © 2002-2005 Deep Training/Litwin Consulting, Inc.   56




            Creating SQL Cache Dependency
            on SqlDataSource

            u   Set a few
                properties in
                property sheet




                      © 2002-2005 Deep Training/Litwin Consulting, Inc.   57




©2002-2005 Deep Training/Litwin Consulting, Inc. All Rights Reserved Worldwide. Unauthorized duplication is strictly prohibited.

                                                                               Page 19
Creating SQL Cache Dependency
            from Code

            Cache.Insert(quot;dsTitlesquot;,
            dsCache, new
            SqlCacheDependency(quot;pubsquot;,
            quot;titlesquot;)




                       © 2002-2005 Deep Training/Litwin Consulting, Inc.   58




            Cross-
            Cross-Page Posting

            u   Ability to use Web server controls even when
                posting across pages
            u   Use PostBackUrl property of button control to
                indicate target of post
            u   On Target page, you can retrieve control
                values using code like …
                                   like…
            strValue =
            PreviousPage.FindControl(quot;txtNamequot;)


                       © 2002-2005 Deep Training/Litwin Consulting, Inc.   59




            What's New in Compilation
           u    Autocompile anything
                l   CS files, VB files, RESX files, and so on
                l   Simply drop files into special directories
                l   Extensible with custom build providers
           u    New code-behind model
                    code-
                l   Fixes fragilities in version 1
                l   Relies on partial class support in compilers
           u    Precompile and deploy without source
           u    Much richer Copy Project menu
                       © 2002-2005 Deep Training/Litwin Consulting, Inc.   60




©2002-2005 Deep Training/Litwin Consulting, Inc. All Rights Reserved Worldwide. Unauthorized duplication is strictly prohibited.

                                                                                Page 20
Precompilation
            u   Precompile.axd precompiles sites in
                place to avoid first-access delays
                               first-




                    © 2002-2005 Deep Training/Litwin Consulting, Inc.   61




            Deploying without Source
            u   Aspnet_compiler.exe precompiles sites
                and deploys without source code
            u   Accessible from Visual Studio via
                Build|Publish menu




                    © 2002-2005 Deep Training/Litwin Consulting, Inc.   62




            Validation Groups
            ValidGroups.aspx

            u   Allows you to group together related
                validation controls
            u   Button in one group will not trigger controls in
                a separate group
            <asp:Button ID=quot;cmdSearchCity quot; Runat=quot;serverquot;
            Text=quot;Searchquot; ValidationGroup =quot;CitySearchquot; />

            <asp:RequiredFieldValidator ID=quot;rfvSearchNamequot;
             Runat=quot;serverquot; ErrorMessage=quot;Enter name.quot;
             ControlToValidate=quot;txtSearchNamequot;
             ValidationGroup=quot;NameSearchquot;>
            </asp:RequiredFieldValidator>

                    © 2002-2005 Deep Training/Litwin Consulting, Inc.   63




©2002-2005 Deep Training/Litwin Consulting, Inc. All Rights Reserved Worldwide. Unauthorized duplication is strictly prohibited.

                                                                             Page 21
Conclusion
            u   ASP.NET 2.0 is an exciting new update
            u   Visual Studio 2005 gets much better
            u   Data controls make two-way data binding easy and
                                      two-
                reduce code significantly
            u   Master pages make visual inheritance of a page template
                a snap
            u   Numerous security enhancements make the management
                of users, roles, profiles so much easier
            u   Themes allow you to provide a consistent & configurable
                look to pages
            u   Other cools features include cache dependencies,
                validation groups, x-page posting, precompilation , etc.
                                    x-             precompilation,
            u   The above features and more make ASP.NET 2.0 / VS
                2005 a must-have upgrade
                        must-
                     © 2002-2005 Deep Training/Litwin Consulting, Inc.   64




            Thank You
            u   Download materials (slides/samples)
                l cds.fhcrc.org




                     © 2002-2005 Deep Training/Litwin Consulting, Inc.   65




©2002-2005 Deep Training/Litwin Consulting, Inc. All Rights Reserved Worldwide. Unauthorized duplication is strictly prohibited.

                                                                              Page 22

Más contenido relacionado

La actualidad más candente

Applying 'Kanban' in Enterprise-Class Products Sustaining Engineering - An Ex...
Applying 'Kanban' in Enterprise-Class Products Sustaining Engineering - An Ex...Applying 'Kanban' in Enterprise-Class Products Sustaining Engineering - An Ex...
Applying 'Kanban' in Enterprise-Class Products Sustaining Engineering - An Ex...Tathagat Varma
 
Domino app dev competitive advantage final
Domino app dev competitive advantage finalDomino app dev competitive advantage final
Domino app dev competitive advantage finalJohn Head
 
OpenNTF.org: Celebrating 10 years of community driven open source (Speedgeeki...
OpenNTF.org: Celebrating 10 years of community driven open source (Speedgeeki...OpenNTF.org: Celebrating 10 years of community driven open source (Speedgeeki...
OpenNTF.org: Celebrating 10 years of community driven open source (Speedgeeki...John Head
 
Novell ZENworks Application Virtualization Advanced Administration
Novell ZENworks Application Virtualization Advanced AdministrationNovell ZENworks Application Virtualization Advanced Administration
Novell ZENworks Application Virtualization Advanced AdministrationNovell
 
Flex For Java Developers - SDForum Java SIG
Flex For Java Developers - SDForum Java SIGFlex For Java Developers - SDForum Java SIG
Flex For Java Developers - SDForum Java SIGChris Richardson
 
CloudBees Toronto Presentation
CloudBees Toronto PresentationCloudBees Toronto Presentation
CloudBees Toronto PresentationXebiaLabs
 
Domino app dev competitive advantage for blug
Domino app dev competitive advantage for blugDomino app dev competitive advantage for blug
Domino app dev competitive advantage for blugJohn Head
 
Performance Management In The New Frontier Of Rich Internet Applications
Performance Management In The New Frontier Of Rich Internet ApplicationsPerformance Management In The New Frontier Of Rich Internet Applications
Performance Management In The New Frontier Of Rich Internet ApplicationsBen Rushlo
 
EMC #1 Open XML Database (OEM)
EMC #1 Open XML Database (OEM)EMC #1 Open XML Database (OEM)
EMC #1 Open XML Database (OEM)Mountaha
 
Flex 4.5 and mobile development
Flex 4.5 and mobile developmentFlex 4.5 and mobile development
Flex 4.5 and mobile developmentMichael Chaize
 
Improve your Developer Experiece using the WAS Liberty Profile with JRebel
Improve your Developer Experiece using the WAS Liberty Profile with JRebel Improve your Developer Experiece using the WAS Liberty Profile with JRebel
Improve your Developer Experiece using the WAS Liberty Profile with JRebel Anton Arhipov
 
Emc World Evergreen Preso 5 16 07 With Demo Slides
Emc World Evergreen Preso 5 16 07 With Demo SlidesEmc World Evergreen Preso 5 16 07 With Demo Slides
Emc World Evergreen Preso 5 16 07 With Demo SlidesBlueFish
 
JBoss Analyst tour Sept 2003
JBoss Analyst tour Sept 2003JBoss Analyst tour Sept 2003
JBoss Analyst tour Sept 2003runsignup
 
Comparing Flex, Grails, GWT, Seam, Struts 2 and Wicket
Comparing Flex, Grails, GWT, Seam, Struts 2 and WicketComparing Flex, Grails, GWT, Seam, Struts 2 and Wicket
Comparing Flex, Grails, GWT, Seam, Struts 2 and WicketMatt Raible
 
Convio APIs, what are they good for?
Convio APIs, what are they good for?Convio APIs, what are they good for?
Convio APIs, what are they good for?Sara Hoffman
 
The basics of version control
The basics of version controlThe basics of version control
The basics of version controlMatt Fielding
 
JDE & Peoplesoft 3 | John Schiff | JDE World Technology Expanding Your World.pdf
JDE & Peoplesoft 3 | John Schiff | JDE World Technology Expanding Your World.pdfJDE & Peoplesoft 3 | John Schiff | JDE World Technology Expanding Your World.pdf
JDE & Peoplesoft 3 | John Schiff | JDE World Technology Expanding Your World.pdfInSync2011
 
DB2 z/OS &amp; Java - What\'s New?
DB2 z/OS &amp; Java - What\'s New?DB2 z/OS &amp; Java - What\'s New?
DB2 z/OS &amp; Java - What\'s New?Laura Hood
 

La actualidad más candente (20)

Applying 'Kanban' in Enterprise-Class Products Sustaining Engineering - An Ex...
Applying 'Kanban' in Enterprise-Class Products Sustaining Engineering - An Ex...Applying 'Kanban' in Enterprise-Class Products Sustaining Engineering - An Ex...
Applying 'Kanban' in Enterprise-Class Products Sustaining Engineering - An Ex...
 
Domino app dev competitive advantage final
Domino app dev competitive advantage finalDomino app dev competitive advantage final
Domino app dev competitive advantage final
 
Java/J2EE Companion
Java/J2EE CompanionJava/J2EE Companion
Java/J2EE Companion
 
OpenNTF.org: Celebrating 10 years of community driven open source (Speedgeeki...
OpenNTF.org: Celebrating 10 years of community driven open source (Speedgeeki...OpenNTF.org: Celebrating 10 years of community driven open source (Speedgeeki...
OpenNTF.org: Celebrating 10 years of community driven open source (Speedgeeki...
 
Novell ZENworks Application Virtualization Advanced Administration
Novell ZENworks Application Virtualization Advanced AdministrationNovell ZENworks Application Virtualization Advanced Administration
Novell ZENworks Application Virtualization Advanced Administration
 
Flex For Java Developers - SDForum Java SIG
Flex For Java Developers - SDForum Java SIGFlex For Java Developers - SDForum Java SIG
Flex For Java Developers - SDForum Java SIG
 
CloudBees Toronto Presentation
CloudBees Toronto PresentationCloudBees Toronto Presentation
CloudBees Toronto Presentation
 
What’s New ?Linux on System z
What’s New ?Linux on System zWhat’s New ?Linux on System z
What’s New ?Linux on System z
 
Domino app dev competitive advantage for blug
Domino app dev competitive advantage for blugDomino app dev competitive advantage for blug
Domino app dev competitive advantage for blug
 
Performance Management In The New Frontier Of Rich Internet Applications
Performance Management In The New Frontier Of Rich Internet ApplicationsPerformance Management In The New Frontier Of Rich Internet Applications
Performance Management In The New Frontier Of Rich Internet Applications
 
EMC #1 Open XML Database (OEM)
EMC #1 Open XML Database (OEM)EMC #1 Open XML Database (OEM)
EMC #1 Open XML Database (OEM)
 
Flex 4.5 and mobile development
Flex 4.5 and mobile developmentFlex 4.5 and mobile development
Flex 4.5 and mobile development
 
Improve your Developer Experiece using the WAS Liberty Profile with JRebel
Improve your Developer Experiece using the WAS Liberty Profile with JRebel Improve your Developer Experiece using the WAS Liberty Profile with JRebel
Improve your Developer Experiece using the WAS Liberty Profile with JRebel
 
Emc World Evergreen Preso 5 16 07 With Demo Slides
Emc World Evergreen Preso 5 16 07 With Demo SlidesEmc World Evergreen Preso 5 16 07 With Demo Slides
Emc World Evergreen Preso 5 16 07 With Demo Slides
 
JBoss Analyst tour Sept 2003
JBoss Analyst tour Sept 2003JBoss Analyst tour Sept 2003
JBoss Analyst tour Sept 2003
 
Comparing Flex, Grails, GWT, Seam, Struts 2 and Wicket
Comparing Flex, Grails, GWT, Seam, Struts 2 and WicketComparing Flex, Grails, GWT, Seam, Struts 2 and Wicket
Comparing Flex, Grails, GWT, Seam, Struts 2 and Wicket
 
Convio APIs, what are they good for?
Convio APIs, what are they good for?Convio APIs, what are they good for?
Convio APIs, what are they good for?
 
The basics of version control
The basics of version controlThe basics of version control
The basics of version control
 
JDE & Peoplesoft 3 | John Schiff | JDE World Technology Expanding Your World.pdf
JDE & Peoplesoft 3 | John Schiff | JDE World Technology Expanding Your World.pdfJDE & Peoplesoft 3 | John Schiff | JDE World Technology Expanding Your World.pdf
JDE & Peoplesoft 3 | John Schiff | JDE World Technology Expanding Your World.pdf
 
DB2 z/OS &amp; Java - What\'s New?
DB2 z/OS &amp; Java - What\'s New?DB2 z/OS &amp; Java - What\'s New?
DB2 z/OS &amp; Java - What\'s New?
 

Similar a Asp

Asp.net.2.0 beta2 overview
Asp.net.2.0 beta2 overviewAsp.net.2.0 beta2 overview
Asp.net.2.0 beta2 overviewsktech2010
 
.NET Application Modernization with PAS and Azure DevOps
.NET Application Modernization with PAS and Azure DevOps.NET Application Modernization with PAS and Azure DevOps
.NET Application Modernization with PAS and Azure DevOpsVMware Tanzu
 
Mohammed alam
Mohammed alamMohammed alam
Mohammed alamaltwirqi
 
New Capabilities and Product Strategy for .NET on PCF
New Capabilities and Product Strategy for .NET on PCF New Capabilities and Product Strategy for .NET on PCF
New Capabilities and Product Strategy for .NET on PCF VMware Tanzu
 
RichardChauvetShortResume2015
RichardChauvetShortResume2015RichardChauvetShortResume2015
RichardChauvetShortResume2015Richard Chauvet
 
Duncan hallas netbiscuits mobile publishing masterclass
Duncan hallas netbiscuits mobile publishing masterclassDuncan hallas netbiscuits mobile publishing masterclass
Duncan hallas netbiscuits mobile publishing masterclassJames Cameron
 
E G Innovations Vdi Monitoring
E G Innovations Vdi MonitoringE G Innovations Vdi Monitoring
E G Innovations Vdi MonitoringElisaBerneyBrown
 
The Business Impact of Virtualization
The Business Impact of VirtualizationThe Business Impact of Virtualization
The Business Impact of VirtualizationFlexera
 
A Continuous Delivery Safety Net for Databases
A Continuous Delivery Safety Net for DatabasesA Continuous Delivery Safety Net for Databases
A Continuous Delivery Safety Net for DatabasesIBM UrbanCode Products
 
Innovating the Software Development Process at Cadence Design Systems
Innovating the Software Development Process at Cadence Design SystemsInnovating the Software Development Process at Cadence Design Systems
Innovating the Software Development Process at Cadence Design SystemsRahul Razdan
 
Jim Bello Resume
Jim Bello ResumeJim Bello Resume
Jim Bello Resumejimbelo
 
IGC Solutions for EMC Documentation
IGC Solutions for EMC DocumentationIGC Solutions for EMC Documentation
IGC Solutions for EMC DocumentationLeslie Diephuis
 
Novell Service Desk overview
Novell Service Desk overviewNovell Service Desk overview
Novell Service Desk overviewJon Giffard
 
SAP BusinessObjects Dashboards
SAP BusinessObjects DashboardsSAP BusinessObjects Dashboards
SAP BusinessObjects Dashboardsdcd2z
 
01.egovFrame Training Book I
01.egovFrame Training Book I01.egovFrame Training Book I
01.egovFrame Training Book IChuong Nguyen
 
HP Helion Webinar #2
HP Helion Webinar #2 HP Helion Webinar #2
HP Helion Webinar #2 BeMyApp
 
Tips and tricks for optimizing windows virtual desktops final - Jeff Stokes
Tips and tricks for optimizing windows virtual desktops final - Jeff StokesTips and tricks for optimizing windows virtual desktops final - Jeff Stokes
Tips and tricks for optimizing windows virtual desktops final - Jeff StokesJeff Stokes
 
IntlandSoftware: codeBeamer 6.0 + Requirements Management
IntlandSoftware: codeBeamer 6.0 + Requirements Management IntlandSoftware: codeBeamer 6.0 + Requirements Management
IntlandSoftware: codeBeamer 6.0 + Requirements Management Intland Software GmbH
 

Similar a Asp (20)

Asp.net.2.0 beta2 overview
Asp.net.2.0 beta2 overviewAsp.net.2.0 beta2 overview
Asp.net.2.0 beta2 overview
 
.NET Application Modernization with PAS and Azure DevOps
.NET Application Modernization with PAS and Azure DevOps.NET Application Modernization with PAS and Azure DevOps
.NET Application Modernization with PAS and Azure DevOps
 
Mohammed alam
Mohammed alamMohammed alam
Mohammed alam
 
Sce Partners Overview
Sce Partners OverviewSce Partners Overview
Sce Partners Overview
 
New Capabilities and Product Strategy for .NET on PCF
New Capabilities and Product Strategy for .NET on PCF New Capabilities and Product Strategy for .NET on PCF
New Capabilities and Product Strategy for .NET on PCF
 
RichardChauvetShortResume2015
RichardChauvetShortResume2015RichardChauvetShortResume2015
RichardChauvetShortResume2015
 
Duncan hallas netbiscuits mobile publishing masterclass
Duncan hallas netbiscuits mobile publishing masterclassDuncan hallas netbiscuits mobile publishing masterclass
Duncan hallas netbiscuits mobile publishing masterclass
 
E G Innovations Vdi Monitoring
E G Innovations Vdi MonitoringE G Innovations Vdi Monitoring
E G Innovations Vdi Monitoring
 
The Business Impact of Virtualization
The Business Impact of VirtualizationThe Business Impact of Virtualization
The Business Impact of Virtualization
 
A Continuous Delivery Safety Net for Databases
A Continuous Delivery Safety Net for DatabasesA Continuous Delivery Safety Net for Databases
A Continuous Delivery Safety Net for Databases
 
Innovating the Software Development Process at Cadence Design Systems
Innovating the Software Development Process at Cadence Design SystemsInnovating the Software Development Process at Cadence Design Systems
Innovating the Software Development Process at Cadence Design Systems
 
Jim Bello Resume
Jim Bello ResumeJim Bello Resume
Jim Bello Resume
 
Resume-JorgeGuerrero
Resume-JorgeGuerreroResume-JorgeGuerrero
Resume-JorgeGuerrero
 
IGC Solutions for EMC Documentation
IGC Solutions for EMC DocumentationIGC Solutions for EMC Documentation
IGC Solutions for EMC Documentation
 
Novell Service Desk overview
Novell Service Desk overviewNovell Service Desk overview
Novell Service Desk overview
 
SAP BusinessObjects Dashboards
SAP BusinessObjects DashboardsSAP BusinessObjects Dashboards
SAP BusinessObjects Dashboards
 
01.egovFrame Training Book I
01.egovFrame Training Book I01.egovFrame Training Book I
01.egovFrame Training Book I
 
HP Helion Webinar #2
HP Helion Webinar #2 HP Helion Webinar #2
HP Helion Webinar #2
 
Tips and tricks for optimizing windows virtual desktops final - Jeff Stokes
Tips and tricks for optimizing windows virtual desktops final - Jeff StokesTips and tricks for optimizing windows virtual desktops final - Jeff Stokes
Tips and tricks for optimizing windows virtual desktops final - Jeff Stokes
 
IntlandSoftware: codeBeamer 6.0 + Requirements Management
IntlandSoftware: codeBeamer 6.0 + Requirements Management IntlandSoftware: codeBeamer 6.0 + Requirements Management
IntlandSoftware: codeBeamer 6.0 + Requirements Management
 

Más de Adil Jafri

Csajsp Chapter5
Csajsp Chapter5Csajsp Chapter5
Csajsp Chapter5Adil Jafri
 
Programming Asp Net Bible
Programming Asp Net BibleProgramming Asp Net Bible
Programming Asp Net BibleAdil Jafri
 
Network Programming Clients
Network Programming ClientsNetwork Programming Clients
Network Programming ClientsAdil Jafri
 
Ta Javaserverside Eran Toch
Ta Javaserverside Eran TochTa Javaserverside Eran Toch
Ta Javaserverside Eran TochAdil Jafri
 
Csajsp Chapter10
Csajsp Chapter10Csajsp Chapter10
Csajsp Chapter10Adil Jafri
 
Flashmx Tutorials
Flashmx TutorialsFlashmx Tutorials
Flashmx TutorialsAdil Jafri
 
Java For The Web With Servlets%2cjsp%2cand Ejb
Java For The Web With Servlets%2cjsp%2cand EjbJava For The Web With Servlets%2cjsp%2cand Ejb
Java For The Web With Servlets%2cjsp%2cand EjbAdil Jafri
 
Csajsp Chapter12
Csajsp Chapter12Csajsp Chapter12
Csajsp Chapter12Adil Jafri
 
Flash Tutorial
Flash TutorialFlash Tutorial
Flash TutorialAdil Jafri
 

Más de Adil Jafri (20)

Csajsp Chapter5
Csajsp Chapter5Csajsp Chapter5
Csajsp Chapter5
 
Php How To
Php How ToPhp How To
Php How To
 
Php How To
Php How ToPhp How To
Php How To
 
Owl Clock
Owl ClockOwl Clock
Owl Clock
 
Phpcodebook
PhpcodebookPhpcodebook
Phpcodebook
 
Phpcodebook
PhpcodebookPhpcodebook
Phpcodebook
 
Programming Asp Net Bible
Programming Asp Net BibleProgramming Asp Net Bible
Programming Asp Net Bible
 
Tcpip Intro
Tcpip IntroTcpip Intro
Tcpip Intro
 
Network Programming Clients
Network Programming ClientsNetwork Programming Clients
Network Programming Clients
 
Jsp Tutorial
Jsp TutorialJsp Tutorial
Jsp Tutorial
 
Ta Javaserverside Eran Toch
Ta Javaserverside Eran TochTa Javaserverside Eran Toch
Ta Javaserverside Eran Toch
 
Csajsp Chapter10
Csajsp Chapter10Csajsp Chapter10
Csajsp Chapter10
 
Javascript
JavascriptJavascript
Javascript
 
Flashmx Tutorials
Flashmx TutorialsFlashmx Tutorials
Flashmx Tutorials
 
Java For The Web With Servlets%2cjsp%2cand Ejb
Java For The Web With Servlets%2cjsp%2cand EjbJava For The Web With Servlets%2cjsp%2cand Ejb
Java For The Web With Servlets%2cjsp%2cand Ejb
 
Html Css
Html CssHtml Css
Html Css
 
Digwc
DigwcDigwc
Digwc
 
Csajsp Chapter12
Csajsp Chapter12Csajsp Chapter12
Csajsp Chapter12
 
Html Frames
Html FramesHtml Frames
Html Frames
 
Flash Tutorial
Flash TutorialFlash Tutorial
Flash Tutorial
 

Último

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 

Último (20)

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 

Asp

  • 1. ASP.NET 2.0 and Visual Studio 2005 Overview Paul Litwin Collaborative Data Services, Public Health Sciences, Fred Hutchinson Cancer Research Center cds.fhcrc.org plitwin@fhcrc.org New Features at a Glance Framework Controls Data Login Other New Web Parts Controls Controls Controls Themes Mobility and Page Master Pages Compilation and Skins Localization Role Membership Profiles Configuration and APIs Services Management Site Health Other Maps Monitoring Services © 2002-2005 Deep Training/Litwin Consulting, Inc. 2 IDE Changes © 2002-2005 Deep Training/Litwin Consulting, Inc. 3 ©2002-2005 Deep Training/Litwin Consulting, Inc. All Rights Reserved Worldwide. Unauthorized duplication is strictly prohibited. Page 1
  • 2. Getting Started with VS 2005 u No need to create a project u Instead create a new Web Site u Web sites can be file-system based file- © 2002-2005 Deep Training/Litwin Consulting, Inc. 4 VS 2005 Highlights (1 of 6) u Editor doesn’t reformat HTML unless you doesn’ ask it to! u Selection preserved when switching between Design and Source (HTML) views u Can now validate HTML against additional browsers and XHTML u Edit and Continue is reborn! © 2002-2005 Deep Training/Litwin Consulting, Inc. 5 VS 2005 Highlights (2 of 6) u Code- Code-behind and inline code are equal citizens l Full support for IntelliSense for both styles l Choose your style in Add New Item dialog u Source changes tracked in margin l Unsaved changes in yellow l Recently saved changes in green © 2002-2005 Deep Training/Litwin Consulting, Inc. 6 ©2002-2005 Deep Training/Litwin Consulting, Inc. All Rights Reserved Worldwide. Unauthorized duplication is strictly prohibited. Page 2
  • 3. VS 2005 Highlights (3 of 6) u IntelliSense works everywhere l HTML l Code l Page directives l Web.config l Design view n Technically these are smart tags © 2002-2005 Deep Training/Litwin Consulting, Inc. 7 VS 2005 Highlights (4 of 6) u Speaking of Config Files l Three ways to edit settings 1. Use IntelliSense within web.config file 2. Select ASP.NET tab inside of IIS Admin application, click Edit Configuration btn n Extensive control of web.config settings 3. Select Website | ASP.NET Configuration n Not as complete as IIS Admin tool n Includes Security Setup wizard n Works with non-IIS sites non- © 2002-2005 Deep Training/Litwin Consulting, Inc. 8 VS 2005 Highlights (5 of 6) u Creating event handlers now consistent across languages (VB or C#) l Can do it from property sheet for both languages u Moving windows easier l Thanks to window guides u Toolbox categorizes controls © 2002-2005 Deep Training/Litwin Consulting, Inc. 9 ©2002-2005 Deep Training/Litwin Consulting, Inc. All Rights Reserved Worldwide. Unauthorized duplication is strictly prohibited. Page 3
  • 4. VS 2005 Highlights (6 of 6) u VS ships with personal Web server l No need to create a virtual root l Next version of Cassini Web server u Lots of ways to connect to a site © 2002-2005 Deep Training/Litwin Consulting, Inc. 10 And Did I Mention… Mention… u Express Editions l low -cost entry point for enthusiast/hobbyist/part- enthusiast/hobbyist/part- time dev u Team System l An expanded version of VS that speaks to the whole design/development/testing life- cycle life- n client/server, collaboration based n robust/scalable source control n work item (e.g., bugs) tracking n unit testing, load testing n code analysis n project portal n lots more … © 2002-2005 Deep Training/Litwin Consulting, Inc. 11 Expanding Visual Studio Evaluate Interact with .NET students Learn how Build cool to program apps Hobbyists Enthusiasts © 2002-2005 Deep Training/Litwin Consulting, Inc. 12 Students Faculty ©2002-2005 Deep Training/Litwin Consulting, Inc. All Rights Reserved Worldwide. Unauthorized duplication is strictly prohibited. Page 4
  • 5. Expanding Visual Studio Developer Tester Project VSTE/SD VSTE/ST Manager Application Team Explorer Architect Infrastructure VSTE/SA Architect Team Foundation Server Source Build Control Server Users & Web Browser Management Project Work Portal Items Reporting © 2002-2005 Deep Training/Litwin & Analytics Consulting, Inc. 13 Visual Studio 2005 “Personalized productivity ” Testers Architects Enterprise Devs Consultants Professionals VB6 Devs Part-Timers Hobbyists Students Enthusiasts © 2002-2005 Deep Training/Litwin Consulting, Inc. 14 Data Controls © 2002-2005 Deep Training/Litwin Consulting, Inc. 15 ©2002-2005 Deep Training/Litwin Consulting, Inc. All Rights Reserved Worldwide. Unauthorized duplication is strictly prohibited. Page 5
  • 6. Binding Data to Controls u ASP.NET 1.x supported rich 1-way 1- binding syntax but you still had to write quite a bit of code to get data in and out of controls u ASP.NET 2.0 supports two-way two- (read/write) binding with no code in many situations © 2002-2005 Deep Training/Litwin Consulting, Inc. 16 Data Source Control u A family of controls that assist in data binding l Middleman between data bound controls and data sources u Types of Data Source Controls l Tabular l Hierarchical n SqlDataSource n XmlDataSource n AccessDataSource n SiteMapDataSource n ObjectDataSource © 2002-2005 Deep Training/Litwin Consulting, Inc. 17 New 2.0 Data-Bound Controls Data- u List Controls l BulletedList u Composite Controls l GridView l DetailsView l FormView u Hierarchical Controls l TreeView l Menu © 2002-2005 Deep Training/Litwin Consulting, Inc. 18 ©2002-2005 Deep Training/Litwin Consulting, Inc. All Rights Reserved Worldwide. Unauthorized duplication is strictly prohibited. Page 6
  • 7. GridView Control Example: GridView.aspx u A “code - less ” DataGrid code-less” u Walk- through of grid with automatic Walk- sorting (ascending & descending), pagination 1. Add GridView to page 2. Using GridView Tasks pane, choose DataSource 3. Check EnablePaging & EnableSorting © 2002-2005 Deep Training/Litwin Consulting, Inc. 19 GridView with Updating Example: GridViewUpdate1.aspx u Can also be done without code 1. Add GridView to page 2. Choose Data Source l On quot;Configure the select statementquot; page l Click Advanced Options l Check “ Generate Insert, Update, and Delete statements” statements” 3. Configure GridView l Check “ Enable Editing” and/or Enable Deleting Editing” © 2002-2005 Deep Training/Litwin Consulting, Inc. 20 The Single-Record Form Problem Single- u ASP.NET 1.x provided no help to the developer having to create a single -record single- “form” view of data form” u ASP.NET 2.0 gives us two solutions l DetailsView – fixed look (supports styles but no field templates); can't get at individual fields l FormView – fully templated (VS will generate basic template for you); will work with validation controls u Both support editing, pagination © 2002-2005 Deep Training/Litwin Consulting, Inc. 21 ©2002-2005 Deep Training/Litwin Consulting, Inc. All Rights Reserved Worldwide. Unauthorized duplication is strictly prohibited. Page 7
  • 8. FormView vs. DetailsView Controls © 2002-2005 Deep Training/Litwin Consulting, Inc. 22 Master Pages and Navigation © 2002-2005 Deep Training/Litwin Consulting, Inc. 23 Navigation u Three Pieces 1. Navigation SiteMap n Web.sitemap XML file n Allows you to create a sitemap for navigation purposes 2. SiteMapDataSource n Reads Web.sitemap file and makes available to TreeView control 3. Controls n TreeView – displays navigation tree n Menu – displays flyout menus n SiteMapPath – quot;breadcrumbquot; path © 2002-2005 Deep Training/Litwin Consulting, Inc. 24 ©2002-2005 Deep Training/Litwin Consulting, Inc. All Rights Reserved Worldwide. Unauthorized duplication is strictly prohibited. Page 8
  • 9. Master Pages u Major shortcoming of ASP.NET 1.x: lack of any easy way to create page templates that other pages can inherit u Enter ASP.NET 2.0 Master Pages l Easy and powerful way to create a common layout for all (or a subset of) pages in site l Support for multiple levels of master pages l WYSIWYG support for master pages in Visual Studio © 2002-2005 Deep Training/Litwin Consulting, Inc. 25 Mastering Master Pages u Arrange content on master page (.master extension) l Add placeholders for content pages using the ContentPlaceHolder element u Create pages based on master page l Use MasterPageFile attribute in page directive l Add content to Content element © 2002-2005 Deep Training/Litwin Consulting, Inc. 26 Master Pages Demo © 2002-2005 Deep Training/Litwin Consulting, Inc. 27 ©2002-2005 Deep Training/Litwin Consulting, Inc. All Rights Reserved Worldwide. Unauthorized duplication is strictly prohibited. Page 9
  • 10. Login Controls and Security © 2002-2005 Deep Training/Litwin Consulting, Inc. 28 New Security Parts (1 of 2) u Forms Authentication l Cookieless authentication now supported u Login Controls l UI controls for managing login of users u Membership l Standardized solution for storing forms authentication data l Membership.ValidateUser method l Login controls wrap up membership service l Provider- Provider-based © 2002-2005 Deep Training/Litwin Consulting, Inc. 29 New Security Parts (2 of 2) u Role Management l Simplifies authorization code you have to write l Provider- Provider-based u Personalization l Simplifies storing of site personalization data in user profiles l Support for strongly -typed profile properties strongly- l Provider- Provider-based © 2002-2005 Deep Training/Litwin Consulting, Inc. 30 ©2002-2005 Deep Training/Litwin Consulting, Inc. All Rights Reserved Worldwide. Unauthorized duplication is strictly prohibited. Page 10
  • 11. New Features at a Glance Framework Controls Data Login Other New Web Parts Controls Controls Controls Themes Mobility and Page Master Pages Compilation and Skins Localization Role Membership Profiles Configuration and APIs Services Management Site Health Other Maps Monitoring Services © 2002-2005 Deep Training/Litwin Consulting, Inc. 31 Forms Authentication <authentication mode=quot;Formsquot;> <forms name=quot;namequot; cookieless=UseCookie|UseUri|AutoDetect| UseDeviceProfile defaultUrl=[URL] domain=domain name loginUrl=quot;urlquot; protection=quot; All |None|Encryption|Validationquot; timeout=quot;30quot; path=quot;/quot; requireSSL=quot;true| false quot; slidingExpiration=quot;true|false quot;> </forms> </authentication> © 2002-2005 Deep Training/Litwin Consulting, Inc. 32 Using Security Setup Wizard u Walks you through setting up authentication, membership provider, users, and role management for Web site u Can setup Forms or Windows auth u Start wizard from Web Site Admin Tool (Website | ASP.NET Configuration) © 2002-2005 Deep Training/Litwin Consulting, Inc. 33 ©2002-2005 Deep Training/Litwin Consulting, Inc. All Rights Reserved Worldwide. Unauthorized duplication is strictly prohibited. Page 11
  • 12. Login Controls u Login – log in users (goes on login page) u LoginView – displays different views based on whether user is authenticated u PasswordRecovery – recover or reset lost password u LoginStatus – displays login or logout link u LoginName – displays login name for authenticated users u CreateUserWizard – steps user through wizard to create new account u ChangePassword – changes password for user © 2002-2005 Deep Training/Litwin Consulting, Inc. 34 Login Controls Demo © 2002-2005 Deep Training/Litwin Consulting, Inc. 35 Membership Service u Saves you from having to manage users and passwords u Login controls may obviate need to directly work with the classes in many cases u Choice of providers (SQL Server, Access, etc.) u Example Uses l Authenticate User n Membership.ValidateUser() l Find User by Email address n Membership.FindUsersByEmail() l Estimate number of users online n Membership.GetNumberOfUsersOnline() © 2002-2005 Deep Training/Litwin Consulting, Inc. 36 ©2002-2005 Deep Training/Litwin Consulting, Inc. All Rights Reserved Worldwide. Unauthorized duplication is strictly prohibited. Page 12
  • 13. Role Service u Simplifies authorization using roles u Manage roles at design time using ASP.NET Web Admin tool l Or use Roles and RoleProvider classes at runtime u Use LoginView control to display custom content per role l Order RoleGroup elements from highest to lowest precedence (e.g., Admin first, etc.) u Or use User.IsInRole() method from code © 2002-2005 Deep Training/Litwin Consulting, Inc. 37 Role Service u Role data carried between pages by ASP.NET using encrypted cookies u Reduces round-trips to database for role round- information © 2002-2005 Deep Training/Litwin Consulting, Inc. 38 LoginView Roles Example LoginView.aspx <asp:LoginView ID=quot;lvRolesquot; Runat=quot;serverquot;> <RoleGroups> <asp:RoleGroup Roles=quot;Adminsquot;><ContentTemplate> This message prints for members of the Admins group. </ContentTemplate> </asp:RoleGroup> <asp:RoleGroup Roles=quot;Managersquot;><ContentTemplate> This message prints for members of the Managers group. </ContentTemplate> </asp:RoleGroup> <asp:RoleGroup Roles=quot;Usersquot;><ContentTemplate> This message prints for members of the Users group. </ContentTemplate> </asp:RoleGroup> </RoleGroups> </asp:LoginView> © 2002-2005 Deep Training/Litwin Consulting, Inc. 39 ©2002-2005 Deep Training/Litwin Consulting, Inc. All Rights Reserved Worldwide. Unauthorized duplication is strictly prohibited. Page 13
  • 14. IsInRole Roles Example Roles.aspx.cs protected void Page_Load (…) { // Order by highest to lowest if (User.IsInRole(quot;Developers quot;)) lblRole.Text = quot;Developer. You rule!quot;; else if (User.IsInRole(quot;Managers quot;)) lblRole.Text = quot;Manager. So?quot;; else if (User.IsInRole(quot;Users quot;)) lblRole.Text = quot;Lowly userquot;; else lblRole.Text = quot;Not logged in.quot;; } © 2002-2005 Deep Training/Litwin Consulting, Inc. 40 Personalization Service u No need to create fields in a database to keep track of personalization data u Allows you to strongly type your personalization data u You maintain personalization data in user profiles © 2002-2005 Deep Training/Litwin Consulting, Inc. 41 Creating a Profile <profile defaultProvider=quot;AspNetSqlProviderquot;> <properties> <add name=quot;sexquot; type=quot;System.Stringquot;/> <add name=quot;agequot; type=quot;System.Int32quot; /> <add name=quot;colorquot; type=quot;System.Stringquot;/> <add name=quot;birthdatequot; type=quot;System.DateTimequot; /> </properties> </profile> © 2002-2005 Deep Training/Litwin Consulting, Inc. 42 ©2002-2005 Deep Training/Litwin Consulting, Inc. All Rights Reserved Worldwide. Unauthorized duplication is strictly prohibited. Page 14
  • 15. Reading/Writing Profile Data Profiles.aspx protected void cmdSave_Click(…) { Profile.sex = txtSex.Text; } protected void cmdGet_Click(…) { txtSex.Text = (string)Profile.sex; } © 2002-2005 Deep Training/Litwin Consulting, Inc. 43 Personalization Profiles u Especially useful for customizing… customizing… l Themes l Web Parts © 2002-2005 Deep Training/Litwin Consulting, Inc. 44 Themes and Skins © 2002-2005 Deep Training/Litwin Consulting, Inc. 45 ©2002-2005 Deep Training/Litwin Consulting, Inc. All Rights Reserved Worldwide. Unauthorized duplication is strictly prohibited. Page 15
  • 16. Themes & Skins u Theme l Collection of property settings (skins) that allow you to define a standard look of pages and controls u Skin l Set of visual attributes applied to a control © 2002-2005 Deep Training/Litwin Consulting, Inc. 46 What's Themable? u Properties that control appearance u Does not include content or behavior attributes such as AllowPaging, AutoPostback © 2002-2005 Deep Training/Litwin Consulting, Inc. 47 Creating a Theme – Basics u Create folder under your site's Themes folder u Theme name is derived from folder name u Theme folder may contain .skin, .css, and image files © 2002-2005 Deep Training/Litwin Consulting, Inc. 48 ©2002-2005 Deep Training/Litwin Consulting, Inc. All Rights Reserved Worldwide. Unauthorized duplication is strictly prohibited. Page 16
  • 17. Creating a Theme – Steps 1. Add theme folder to app using Add Folder|Theme folder 2. Add . aspx page to theme folder. .aspx 3. Add controls to page 4. Customize the look of the controls 5. Remove ID attribute and any attributes that you do not want to be part of theme (e.g., Text) 6. Add SkinID attribute to any control to create alternate skins 7. Remove all non-control content from file non- 8. Rename file to .skin extension © 2002-2005 Deep Training/Litwin Consulting, Inc. 49 Applying Themes u Add attribute to Page directive of page l Theme attribute n Theme settings override any local settings l StyleSheetTheme attribute n Local settings override theme settings l Themes can also be applied programmatically in the Page_PreInit event by setting the Page's Theme or StyleSheetTheme property u Reference SkinIDs when appropriate to get alternate skin for control © 2002-2005 Deep Training/Litwin Consulting, Inc. 50 Theme & Skin Example AdditionalTopics/ThemedSite/Themes © 2002-2005 Deep Training/Litwin Consulting, Inc. 51 ©2002-2005 Deep Training/Litwin Consulting, Inc. All Rights Reserved Worldwide. Unauthorized duplication is strictly prohibited. Page 17
  • 18. Theme & Skin Example Pumpkin Pumpkin Orange.skin <asp:Label Runat=quot;serverquot; ForeColor=quot;Orangequot; Font-Names=quot;Comic Sans MSquot;></asp:Label> <asp:TextBox Runat=quot;serverquot; ForeColor=quot;Orangequot; Font-Names=quot;Comic Sans MSquot;></asp:TextBox> <asp:Button Runat=quot;serverquot; ForeColor=quot;Orangequot; Font-Names=quot;Comic Sans MSquot; /> … <asp:Label SkinId=quot;Reversequot; Runat=quot;serverquot; ForeColor=quot;Whitequot; BackColor=quot;DarkOrangequot; Font- Names=quot;Comic Sans MSquot; ></asp:Label> <asp:TextBox SkinId=quot;Reversequot; Runat=quot;serverquot; ForeColor=quot;Whitequot; BackColor=quot;DarkOrangequot; Font- Names=quot;Comic Sans MSquot;></asp:TextBox> © 2002-2005 Deep Training/Litwin Consulting, Inc. 52 Theme & Skin Example ThemedPage.aspx <%@ Page Language=quot;VBquot; Theme=quot;Pumpkinquot; ... %> … <asp:TextBox SkinID=quot;Reversequot; ID=quot;txtAgequot; Runat=quot;serverquot; Width=quot;63pxquot; Height=quot;22pxquot;> © 2002-2005 Deep Training/Litwin Consulting, Inc. 53 Themes u Can also be set dynamically from code u Need to set theme in Page_PreInit event © 2002-2005 Deep Training/Litwin Consulting, Inc. 54 ©2002-2005 Deep Training/Litwin Consulting, Inc. All Rights Reserved Worldwide. Unauthorized duplication is strictly prohibited. Page 18
  • 19. Other Topics u Caching Enhancements u Cross- Cross-Page Posting u Compilation Improvements u Validation Groups © 2002-2005 Deep Training/Litwin Consulting, Inc. 55 Caching Dependencies u Work with SQL Server 7/2000 l Works by ASP.NET polling database u Work even better with SQL Server 2005 l No polling necessary © 2002-2005 Deep Training/Litwin Consulting, Inc. 56 Creating SQL Cache Dependency on SqlDataSource u Set a few properties in property sheet © 2002-2005 Deep Training/Litwin Consulting, Inc. 57 ©2002-2005 Deep Training/Litwin Consulting, Inc. All Rights Reserved Worldwide. Unauthorized duplication is strictly prohibited. Page 19
  • 20. Creating SQL Cache Dependency from Code Cache.Insert(quot;dsTitlesquot;, dsCache, new SqlCacheDependency(quot;pubsquot;, quot;titlesquot;) © 2002-2005 Deep Training/Litwin Consulting, Inc. 58 Cross- Cross-Page Posting u Ability to use Web server controls even when posting across pages u Use PostBackUrl property of button control to indicate target of post u On Target page, you can retrieve control values using code like … like… strValue = PreviousPage.FindControl(quot;txtNamequot;) © 2002-2005 Deep Training/Litwin Consulting, Inc. 59 What's New in Compilation u Autocompile anything l CS files, VB files, RESX files, and so on l Simply drop files into special directories l Extensible with custom build providers u New code-behind model code- l Fixes fragilities in version 1 l Relies on partial class support in compilers u Precompile and deploy without source u Much richer Copy Project menu © 2002-2005 Deep Training/Litwin Consulting, Inc. 60 ©2002-2005 Deep Training/Litwin Consulting, Inc. All Rights Reserved Worldwide. Unauthorized duplication is strictly prohibited. Page 20
  • 21. Precompilation u Precompile.axd precompiles sites in place to avoid first-access delays first- © 2002-2005 Deep Training/Litwin Consulting, Inc. 61 Deploying without Source u Aspnet_compiler.exe precompiles sites and deploys without source code u Accessible from Visual Studio via Build|Publish menu © 2002-2005 Deep Training/Litwin Consulting, Inc. 62 Validation Groups ValidGroups.aspx u Allows you to group together related validation controls u Button in one group will not trigger controls in a separate group <asp:Button ID=quot;cmdSearchCity quot; Runat=quot;serverquot; Text=quot;Searchquot; ValidationGroup =quot;CitySearchquot; /> <asp:RequiredFieldValidator ID=quot;rfvSearchNamequot; Runat=quot;serverquot; ErrorMessage=quot;Enter name.quot; ControlToValidate=quot;txtSearchNamequot; ValidationGroup=quot;NameSearchquot;> </asp:RequiredFieldValidator> © 2002-2005 Deep Training/Litwin Consulting, Inc. 63 ©2002-2005 Deep Training/Litwin Consulting, Inc. All Rights Reserved Worldwide. Unauthorized duplication is strictly prohibited. Page 21
  • 22. Conclusion u ASP.NET 2.0 is an exciting new update u Visual Studio 2005 gets much better u Data controls make two-way data binding easy and two- reduce code significantly u Master pages make visual inheritance of a page template a snap u Numerous security enhancements make the management of users, roles, profiles so much easier u Themes allow you to provide a consistent & configurable look to pages u Other cools features include cache dependencies, validation groups, x-page posting, precompilation , etc. x- precompilation, u The above features and more make ASP.NET 2.0 / VS 2005 a must-have upgrade must- © 2002-2005 Deep Training/Litwin Consulting, Inc. 64 Thank You u Download materials (slides/samples) l cds.fhcrc.org © 2002-2005 Deep Training/Litwin Consulting, Inc. 65 ©2002-2005 Deep Training/Litwin Consulting, Inc. All Rights Reserved Worldwide. Unauthorized duplication is strictly prohibited. Page 22