SlideShare une entreprise Scribd logo
1  sur  15
Developing Web Applications Using ASP.NET
Objectives


                In this session, you will learn to:
                   Implement asynchronous processing in Web applications
                   Describe the personalization features provided by ASP.NET
                   2.0
                   Describe ASP.NET 2.0 theme support
                   Implement personalization features
                   Add themes to a Web application
                   Implement customizable themes




     Ver. 1.0                                                          Slide 1 of 15
Developing Web Applications Using ASP.NET
Demo: Optimizing Web Application Performance


                Problem Statement:
                   You are a developer in the Adventure Works organization, a
                   fictitious bicycle manufacturer. You have been asked to assist
                   in creating a new Business-to-Consumer (B2C) Web
                   application and a related Business-to-Employee (B2E) extranet
                   portal.
                   Decisions on the design of the application have already been
                   made. You have been asked to carry out a number of specific
                   tasks in order to implement various elements of this design. As
                   part of the first phase of the B2C development, you have been
                   asked to prototype various performance related techniques for
                   the Web application.




     Ver. 1.0                                                             Slide 2 of 15
Developing Web Applications Using ASP.NET
Demo: Optimizing Web Application Performance (Contd.)


                Solution:
                 • To solve this problem, you need to perform the following task:
                    1. Implement Asynchronous Processing in Web Applications
                        a. Enable asynchronous processing on a page.
                        b. Add asynchronous event handlers for calling a Web service and
                           receiving data from the Web service.
                        c. Test the asynchronous calling of the Web service.




     Ver. 1.0                                                                        Slide 3 of 15
Developing Web Applications Using ASP.NET
ASP.NET 2.0 Personalization Features


                ASP.NET provides profiles for easy implementation of
                personalization in a Web site.
                Profiles consist of a set of named properties that are stored
                for each user. These properties can be:
                   Simple data types
                   Complex data structures
                   Classes from the .NET Framework
                Profiles can be used to store user specific information.
                The profile system has been designed to keep the data in
                the profiles independent of the storage location of the
                profiles. This separation is achieved by using profile
                providers.



     Ver. 1.0                                                         Slide 4 of 15
Developing Web Applications Using ASP.NET
ASP.NET 2.0 Personalization Features (Contd.)


                Profile providers:
                 • A profile provider enables ASP.NET to store and retrieve
                   profiles by using a common API, regardless of the underlying
                   data storage mechanism.
                 • The default provider is the
                   System.Web.Profiles.SQLProfileProvider class,
                   which uses Microsoft SQL Server as its storage mechanism.
                 • To use the default provider, you must create a suitable
                   database on the computer running SQL Server. You can do
                   this by using the regsql.exe tool.
                 • A custom profile provider can also be created, in case profiles
                   need to be stored in a database other than Microsoft SQL
                   Server.




     Ver. 1.0                                                              Slide 5 of 15
Developing Web Applications Using ASP.NET
ASP.NET 2.0 Personalization Features (Contd.)


                Configuring Profile properties:
                   The properties that need to be stored in each user profile for
                   an application can be configured in the Web.config file:
                   <System.web>
                     <anonymousIdentification enabled=“true”/>
                       <profile>
                        <properties>
                           <add name = “PrefPaymentMethod”
                             type =“System.String”
                             allowAnonymous=“true”/>
                       </properties>
                    </profile>
                   </System.web>
                   Profiles can be used even when the user is not authenticated.



     Ver. 1.0                                                              Slide 6 of 15
Developing Web Applications Using ASP.NET
ASP.NET 2.0 Personalization Features (Contd.)


                Getting and Setting Profile Properties:
                 • Profile properties can be accessed by using the Profile
                   object.
                 • A value can be stored in a property of the Profile object as:
                    Profile.PrefPaymentMethod =
                    ddPrefPaymentMethod.SelectedValue;
                 • A value of a property can be retrieved from the Profile
                   object as:
                    lblPrefPaymentMethod = Profile.PrefPaymentMethod;




     Ver. 1.0                                                            Slide 7 of 15
Developing Web Applications Using ASP.NET
Theme Support in ASP.NET 2.0


                A theme is a collection of property settings.
                Themes are used to define the look of pages and controls
                and apply the look consistently across pages.
                Theme settings can be applied to any of the following:
                   The entire Web site
                   A page and its controls
                   Individual controls
                Multiple themes can be created to enable users to choose
                their preferred appearance for the Web site.
                An ASP.NET theme consist of the following objects:
                   Stylesheets
                   Skins
                   Supporting images


     Ver. 1.0                                                      Slide 8 of 15
Developing Web Applications Using ASP.NET
Theme Support in ASP.NET 2.0 (Contd.)


                Themes are stored in the App_Themes folder within an
                application.
                To create a theme, you need to:
                 1. Add a subfolder with the same name as the name of the
                    theme to the App_Themes folder.
                 2. Add stylesheets, skins, and supporting image files to the folder
                    created.
                To create a skin, you need to:
                 1. Create a theme folder under the App_Themes folder.
                 2. Add a skin file to the theme folder.
                 3. Add an entry to the skin file for each class of controls to which
                    you want to apply the theme. For example:
                     <asp:Label runat=“server” Forecolor=“red”/>
                     <asp:Button runat=“server” backcolor=“yellow”
                     bordercolor=“Blue”/>

     Ver. 1.0                                                                Slide 9 of 15
Developing Web Applications Using ASP.NET
Theme Support in ASP.NET 2.0 (Contd.)


                Applying a Theme:
                • A theme can be specified for a particular page by using the <
                  %@Page%> directive as:
                    <%@ Page     Theme = “BlueSky”%>
                   A theme can be specified for the entire application in the root
                   Web.config file as:
                    <configuration>
                        <system.Web>
                          <pages theme =“BlueSky”/>
                        </system.web>
                    </configuration>




     Ver. 1.0                                                              Slide 10 of 15
Developing Web Applications Using ASP.NET
Theme Support in ASP.NET 2.0 (Contd.)


                Enabling Users to Personalize Themes:
                   Themes can be used to enable users to personalize the
                   application.
                   The theme stored in a user’s profile can be set
                   programmatically as each page loads.
                   Theme must be set before or during Page_PreInit event
                   handler as:
                    void Page_PreInit(object sender, EventArgs e)
                    {
                      switch (Request.QueryString[“theme”])
                      {
                        case “Theme1”: Page.Theme = “Theme1”; break;
                        case “Theme2”: Page.Theme = “Theme2”; break;
                      }
                    }


     Ver. 1.0                                                          Slide 11 of 15
Developing Web Applications Using ASP.NET
Demo: Implementing Personalization and Theme in Web Applications


                Problem Statement:
                   You are a developer in the Adventure Works organization, a
                   fictitious bicycle manufacturer. You have been asked to assist
                   in creating a new Business-to-Consumer (B2C) Web
                   application and a related Business-to-Employee (B2E) extranet
                   portal.
                   Decisions on the design of the application have already been
                   made. You have been asked to carry out a number of specific
                   tasks in order to implement various elements of this design. As
                   part of the first phase of the B2C development, you have been
                   asked to prototype personalization and themes for registered
                   members of the Web site.




     Ver. 1.0                                                            Slide 12 of 15
Developing Web Applications Using ASP.NET
Demo: Implementing Personalization and Theme in Web Applications (Contd.)



                 Solution:
                  • To solve this problem, you need to perform following tasks:
                     1. Configure Personalization
                         a.   Open the starter solution.
                         b.   Add a connection string for the profile system.
                         c.   Add personalization providers.
                         d.   Add personalization properties.
                         e.   Control anonymous identification.
                     2. Implement Personalization Functionality
                         a.   Review the UpdateProfile.aspx page.
                         b.   Retrieve profile data at run time.
                         c.   Update profile data at run time.
                         d.   Test the profile functionality of the Web site.




      Ver. 1.0                                                                  Slide 13 of 15
Developing Web Applications Using ASP.NET
Demo: Implementing Personalization and Theme in Web Applications (Contd.)



                   1. Add Themes to the Web Application
                       •    Add a Themes folder to the Web application
                       •    Add the DefaultBlue theme to the Web application.
                       •    Create a definition for a default button.
                       •    Create a definition for a default text box.
                       •    Create a definition for an alternative button.
                       •    Use the DefaultBlue theme.
                   2. Implement Personalized Themes
                       a.   Add a personalized theme property.
                       b.   Add user interface elements for selecting themes.
                       c.   Add code for storing and retrieving the selected theme.
                       d.   Add code for applying the selected theme.
                       e.   Test the personalized theme functionality.




      Ver. 1.0                                                                        Slide 14 of 15
Developing Web Applications Using ASP.NET
Summary


               In this session, you learned that:
                  An ASP.NET profile consists of a set of named properties that
                  are stored for each user.
                  A profile provider enables ASP.NET to store and retrieve
                  profiles by using a common API, regardless of the underlying
                  data storage mechanism.
                  A theme is a collection of property settings that enable user to
                  define and apply the look of pages and controls consistently
                  across the pages.
                  An ASP.NET theme consists of the following objects:
                      Stylesheets
                      Skins
                      Supporting images




    Ver. 1.0                                                              Slide 15 of 15

Contenu connexe

Tendances

Lab 5a) create a struts application
Lab 5a) create a struts applicationLab 5a) create a struts application
Lab 5a) create a struts applicationtechbed
 
3) web development
3) web development3) web development
3) web developmenttechbed
 
Better, Faster, Stronger! Boost Your Team-Based SharePoint Development Using ...
Better, Faster, Stronger! Boost Your Team-Based SharePoint Development Using ...Better, Faster, Stronger! Boost Your Team-Based SharePoint Development Using ...
Better, Faster, Stronger! Boost Your Team-Based SharePoint Development Using ...Richard Calderon
 
Chapter6 web apps-tomcat
Chapter6 web apps-tomcatChapter6 web apps-tomcat
Chapter6 web apps-tomcatVenkat Gowda
 
The Drupal Strongarm Module - Tips and Tricks.
The Drupal Strongarm Module - Tips and Tricks.The Drupal Strongarm Module - Tips and Tricks.
The Drupal Strongarm Module - Tips and Tricks.cgmonroe
 
Intro to Features Module on Drupal
Intro to Features Module on DrupalIntro to Features Module on Drupal
Intro to Features Module on DrupalAidan Foster
 
Wp8.5 p06 themes basics
Wp8.5 p06 themes basicsWp8.5 p06 themes basics
Wp8.5 p06 themes basicstestkiller
 
Mobile application
Mobile applicationMobile application
Mobile applicationaspnet123
 
ASP.NET 06 - Customizing Your Sites Appearance
ASP.NET 06 - Customizing Your Sites AppearanceASP.NET 06 - Customizing Your Sites Appearance
ASP.NET 06 - Customizing Your Sites AppearanceRandy Connolly
 
XPages Extension Library slides
XPages Extension Library   slidesXPages Extension Library   slides
XPages Extension Library slidesNiklas Heidloff
 
Android Study Jam 2
Android Study Jam 2Android Study Jam 2
Android Study Jam 2DSC GVP
 
Magento mega menu extension
Magento mega menu extensionMagento mega menu extension
Magento mega menu extensionBun Danny
 
Ext Js In Action January 2010 (Meap Edition)
Ext Js In Action January 2010 (Meap Edition)Ext Js In Action January 2010 (Meap Edition)
Ext Js In Action January 2010 (Meap Edition)Goran Kljajic
 
Sybase sup hybrid_web_container_article_wp
Sybase sup hybrid_web_container_article_wpSybase sup hybrid_web_container_article_wp
Sybase sup hybrid_web_container_article_wpPrabhakar Manthena
 
IBM Connect2014 JMP106
IBM Connect2014 JMP106IBM Connect2014 JMP106
IBM Connect2014 JMP106Thomas Evans
 

Tendances (20)

Lab 5a) create a struts application
Lab 5a) create a struts applicationLab 5a) create a struts application
Lab 5a) create a struts application
 
3) web development
3) web development3) web development
3) web development
 
Better, Faster, Stronger! Boost Your Team-Based SharePoint Development Using ...
Better, Faster, Stronger! Boost Your Team-Based SharePoint Development Using ...Better, Faster, Stronger! Boost Your Team-Based SharePoint Development Using ...
Better, Faster, Stronger! Boost Your Team-Based SharePoint Development Using ...
 
Chapter6 web apps-tomcat
Chapter6 web apps-tomcatChapter6 web apps-tomcat
Chapter6 web apps-tomcat
 
The Drupal Strongarm Module - Tips and Tricks.
The Drupal Strongarm Module - Tips and Tricks.The Drupal Strongarm Module - Tips and Tricks.
The Drupal Strongarm Module - Tips and Tricks.
 
Intro to Features Module on Drupal
Intro to Features Module on DrupalIntro to Features Module on Drupal
Intro to Features Module on Drupal
 
Wp8.5 p06 themes basics
Wp8.5 p06 themes basicsWp8.5 p06 themes basics
Wp8.5 p06 themes basics
 
Mobile application
Mobile applicationMobile application
Mobile application
 
Eska cms
Eska cmsEska cms
Eska cms
 
ASP.NET 06 - Customizing Your Sites Appearance
ASP.NET 06 - Customizing Your Sites AppearanceASP.NET 06 - Customizing Your Sites Appearance
ASP.NET 06 - Customizing Your Sites Appearance
 
XPages Extension Library slides
XPages Extension Library   slidesXPages Extension Library   slides
XPages Extension Library slides
 
Android Study Jam 2
Android Study Jam 2Android Study Jam 2
Android Study Jam 2
 
Magento mega menu extension
Magento mega menu extensionMagento mega menu extension
Magento mega menu extension
 
Ext Js In Action January 2010 (Meap Edition)
Ext Js In Action January 2010 (Meap Edition)Ext Js In Action January 2010 (Meap Edition)
Ext Js In Action January 2010 (Meap Edition)
 
Data load utility
Data load utilityData load utility
Data load utility
 
Sybase sup hybrid_web_container_article_wp
Sybase sup hybrid_web_container_article_wpSybase sup hybrid_web_container_article_wp
Sybase sup hybrid_web_container_article_wp
 
IBM Connect2014 JMP106
IBM Connect2014 JMP106IBM Connect2014 JMP106
IBM Connect2014 JMP106
 
Maven II
Maven IIMaven II
Maven II
 
Unit4wt
Unit4wtUnit4wt
Unit4wt
 
Spring Mvc
Spring MvcSpring Mvc
Spring Mvc
 

En vedette

Aae oop xp_10
Aae oop xp_10Aae oop xp_10
Aae oop xp_10Niit Care
 
Vb.net session 02
Vb.net session 02Vb.net session 02
Vb.net session 02Niit Care
 
Comp tia n+_session_10
Comp tia n+_session_10Comp tia n+_session_10
Comp tia n+_session_10Niit Care
 
Comp tia n+_session_05
Comp tia n+_session_05Comp tia n+_session_05
Comp tia n+_session_05Niit Care
 
Comp tia a+_session_06
Comp tia a+_session_06Comp tia a+_session_06
Comp tia a+_session_06Niit Care
 
06 intel v_tune_session_08
06 intel v_tune_session_0806 intel v_tune_session_08
06 intel v_tune_session_08Niit Care
 
Xml session05
Xml session05Xml session05
Xml session05Niit Care
 

En vedette (7)

Aae oop xp_10
Aae oop xp_10Aae oop xp_10
Aae oop xp_10
 
Vb.net session 02
Vb.net session 02Vb.net session 02
Vb.net session 02
 
Comp tia n+_session_10
Comp tia n+_session_10Comp tia n+_session_10
Comp tia n+_session_10
 
Comp tia n+_session_05
Comp tia n+_session_05Comp tia n+_session_05
Comp tia n+_session_05
 
Comp tia a+_session_06
Comp tia a+_session_06Comp tia a+_session_06
Comp tia a+_session_06
 
06 intel v_tune_session_08
06 intel v_tune_session_0806 intel v_tune_session_08
06 intel v_tune_session_08
 
Xml session05
Xml session05Xml session05
Xml session05
 

Similaire à 14 asp.net session20

Similaire à 14 asp.net session20 (20)

14 asp.net session20
14 asp.net session2014 asp.net session20
14 asp.net session20
 
11 asp.net session16
11 asp.net session1611 asp.net session16
11 asp.net session16
 
Asp.net performance
Asp.net performanceAsp.net performance
Asp.net performance
 
ASP.NET Presentation
ASP.NET PresentationASP.NET Presentation
ASP.NET Presentation
 
11 asp.net session16
11 asp.net session1611 asp.net session16
11 asp.net session16
 
06 asp.net session08
06 asp.net session0806 asp.net session08
06 asp.net session08
 
Asp.net architecture
Asp.net architectureAsp.net architecture
Asp.net architecture
 
01 asp.net session01
01 asp.net session0101 asp.net session01
01 asp.net session01
 
Asp.net Web Development.pdf
Asp.net Web Development.pdfAsp.net Web Development.pdf
Asp.net Web Development.pdf
 
Building richwebapplicationsusingasp
Building richwebapplicationsusingaspBuilding richwebapplicationsusingasp
Building richwebapplicationsusingasp
 
Road Show Asp Net
Road Show Asp NetRoad Show Asp Net
Road Show Asp Net
 
01 asp.net session01
01 asp.net session0101 asp.net session01
01 asp.net session01
 
Asp.net
Asp.netAsp.net
Asp.net
 
Chapter 5
Chapter 5Chapter 5
Chapter 5
 
Asp.Net 2.0 Presentation
Asp.Net 2.0 PresentationAsp.Net 2.0 Presentation
Asp.Net 2.0 Presentation
 
Go…Running Kentico CMS on Windows Azure
Go…Running Kentico CMS on Windows AzureGo…Running Kentico CMS on Windows Azure
Go…Running Kentico CMS on Windows Azure
 
07 asp.net session10
07 asp.net session1007 asp.net session10
07 asp.net session10
 
Beginners introduction to asp.net
Beginners introduction to asp.netBeginners introduction to asp.net
Beginners introduction to asp.net
 
2310 b 15
2310 b 152310 b 15
2310 b 15
 
2310 b 15
2310 b 152310 b 15
2310 b 15
 

Plus de Niit Care (20)

Ajs 1 b
Ajs 1 bAjs 1 b
Ajs 1 b
 
Ajs 4 b
Ajs 4 bAjs 4 b
Ajs 4 b
 
Ajs 4 a
Ajs 4 aAjs 4 a
Ajs 4 a
 
Ajs 4 c
Ajs 4 cAjs 4 c
Ajs 4 c
 
Ajs 3 b
Ajs 3 bAjs 3 b
Ajs 3 b
 
Ajs 3 a
Ajs 3 aAjs 3 a
Ajs 3 a
 
Ajs 3 c
Ajs 3 cAjs 3 c
Ajs 3 c
 
Ajs 2 b
Ajs 2 bAjs 2 b
Ajs 2 b
 
Ajs 2 a
Ajs 2 aAjs 2 a
Ajs 2 a
 
Ajs 2 c
Ajs 2 cAjs 2 c
Ajs 2 c
 
Ajs 1 a
Ajs 1 aAjs 1 a
Ajs 1 a
 
Ajs 1 c
Ajs 1 cAjs 1 c
Ajs 1 c
 
Dacj 4 2-c
Dacj 4 2-cDacj 4 2-c
Dacj 4 2-c
 
Dacj 4 2-b
Dacj 4 2-bDacj 4 2-b
Dacj 4 2-b
 
Dacj 4 2-a
Dacj 4 2-aDacj 4 2-a
Dacj 4 2-a
 
Dacj 4 1-c
Dacj 4 1-cDacj 4 1-c
Dacj 4 1-c
 
Dacj 4 1-b
Dacj 4 1-bDacj 4 1-b
Dacj 4 1-b
 
Dacj 4 1-a
Dacj 4 1-aDacj 4 1-a
Dacj 4 1-a
 
Dacj 1-2 b
Dacj 1-2 bDacj 1-2 b
Dacj 1-2 b
 
Dacj 1-3 c
Dacj 1-3 cDacj 1-3 c
Dacj 1-3 c
 

Dernier

TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 

Dernier (20)

TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 

14 asp.net session20

  • 1. Developing Web Applications Using ASP.NET Objectives In this session, you will learn to: Implement asynchronous processing in Web applications Describe the personalization features provided by ASP.NET 2.0 Describe ASP.NET 2.0 theme support Implement personalization features Add themes to a Web application Implement customizable themes Ver. 1.0 Slide 1 of 15
  • 2. Developing Web Applications Using ASP.NET Demo: Optimizing Web Application Performance Problem Statement: You are a developer in the Adventure Works organization, a fictitious bicycle manufacturer. You have been asked to assist in creating a new Business-to-Consumer (B2C) Web application and a related Business-to-Employee (B2E) extranet portal. Decisions on the design of the application have already been made. You have been asked to carry out a number of specific tasks in order to implement various elements of this design. As part of the first phase of the B2C development, you have been asked to prototype various performance related techniques for the Web application. Ver. 1.0 Slide 2 of 15
  • 3. Developing Web Applications Using ASP.NET Demo: Optimizing Web Application Performance (Contd.) Solution: • To solve this problem, you need to perform the following task: 1. Implement Asynchronous Processing in Web Applications a. Enable asynchronous processing on a page. b. Add asynchronous event handlers for calling a Web service and receiving data from the Web service. c. Test the asynchronous calling of the Web service. Ver. 1.0 Slide 3 of 15
  • 4. Developing Web Applications Using ASP.NET ASP.NET 2.0 Personalization Features ASP.NET provides profiles for easy implementation of personalization in a Web site. Profiles consist of a set of named properties that are stored for each user. These properties can be: Simple data types Complex data structures Classes from the .NET Framework Profiles can be used to store user specific information. The profile system has been designed to keep the data in the profiles independent of the storage location of the profiles. This separation is achieved by using profile providers. Ver. 1.0 Slide 4 of 15
  • 5. Developing Web Applications Using ASP.NET ASP.NET 2.0 Personalization Features (Contd.) Profile providers: • A profile provider enables ASP.NET to store and retrieve profiles by using a common API, regardless of the underlying data storage mechanism. • The default provider is the System.Web.Profiles.SQLProfileProvider class, which uses Microsoft SQL Server as its storage mechanism. • To use the default provider, you must create a suitable database on the computer running SQL Server. You can do this by using the regsql.exe tool. • A custom profile provider can also be created, in case profiles need to be stored in a database other than Microsoft SQL Server. Ver. 1.0 Slide 5 of 15
  • 6. Developing Web Applications Using ASP.NET ASP.NET 2.0 Personalization Features (Contd.) Configuring Profile properties: The properties that need to be stored in each user profile for an application can be configured in the Web.config file: <System.web> <anonymousIdentification enabled=“true”/> <profile> <properties> <add name = “PrefPaymentMethod” type =“System.String” allowAnonymous=“true”/> </properties> </profile> </System.web> Profiles can be used even when the user is not authenticated. Ver. 1.0 Slide 6 of 15
  • 7. Developing Web Applications Using ASP.NET ASP.NET 2.0 Personalization Features (Contd.) Getting and Setting Profile Properties: • Profile properties can be accessed by using the Profile object. • A value can be stored in a property of the Profile object as: Profile.PrefPaymentMethod = ddPrefPaymentMethod.SelectedValue; • A value of a property can be retrieved from the Profile object as: lblPrefPaymentMethod = Profile.PrefPaymentMethod; Ver. 1.0 Slide 7 of 15
  • 8. Developing Web Applications Using ASP.NET Theme Support in ASP.NET 2.0 A theme is a collection of property settings. Themes are used to define the look of pages and controls and apply the look consistently across pages. Theme settings can be applied to any of the following: The entire Web site A page and its controls Individual controls Multiple themes can be created to enable users to choose their preferred appearance for the Web site. An ASP.NET theme consist of the following objects: Stylesheets Skins Supporting images Ver. 1.0 Slide 8 of 15
  • 9. Developing Web Applications Using ASP.NET Theme Support in ASP.NET 2.0 (Contd.) Themes are stored in the App_Themes folder within an application. To create a theme, you need to: 1. Add a subfolder with the same name as the name of the theme to the App_Themes folder. 2. Add stylesheets, skins, and supporting image files to the folder created. To create a skin, you need to: 1. Create a theme folder under the App_Themes folder. 2. Add a skin file to the theme folder. 3. Add an entry to the skin file for each class of controls to which you want to apply the theme. For example: <asp:Label runat=“server” Forecolor=“red”/> <asp:Button runat=“server” backcolor=“yellow” bordercolor=“Blue”/> Ver. 1.0 Slide 9 of 15
  • 10. Developing Web Applications Using ASP.NET Theme Support in ASP.NET 2.0 (Contd.) Applying a Theme: • A theme can be specified for a particular page by using the < %@Page%> directive as: <%@ Page Theme = “BlueSky”%> A theme can be specified for the entire application in the root Web.config file as: <configuration> <system.Web> <pages theme =“BlueSky”/> </system.web> </configuration> Ver. 1.0 Slide 10 of 15
  • 11. Developing Web Applications Using ASP.NET Theme Support in ASP.NET 2.0 (Contd.) Enabling Users to Personalize Themes: Themes can be used to enable users to personalize the application. The theme stored in a user’s profile can be set programmatically as each page loads. Theme must be set before or during Page_PreInit event handler as: void Page_PreInit(object sender, EventArgs e) { switch (Request.QueryString[“theme”]) { case “Theme1”: Page.Theme = “Theme1”; break; case “Theme2”: Page.Theme = “Theme2”; break; } } Ver. 1.0 Slide 11 of 15
  • 12. Developing Web Applications Using ASP.NET Demo: Implementing Personalization and Theme in Web Applications Problem Statement: You are a developer in the Adventure Works organization, a fictitious bicycle manufacturer. You have been asked to assist in creating a new Business-to-Consumer (B2C) Web application and a related Business-to-Employee (B2E) extranet portal. Decisions on the design of the application have already been made. You have been asked to carry out a number of specific tasks in order to implement various elements of this design. As part of the first phase of the B2C development, you have been asked to prototype personalization and themes for registered members of the Web site. Ver. 1.0 Slide 12 of 15
  • 13. Developing Web Applications Using ASP.NET Demo: Implementing Personalization and Theme in Web Applications (Contd.) Solution: • To solve this problem, you need to perform following tasks: 1. Configure Personalization a. Open the starter solution. b. Add a connection string for the profile system. c. Add personalization providers. d. Add personalization properties. e. Control anonymous identification. 2. Implement Personalization Functionality a. Review the UpdateProfile.aspx page. b. Retrieve profile data at run time. c. Update profile data at run time. d. Test the profile functionality of the Web site. Ver. 1.0 Slide 13 of 15
  • 14. Developing Web Applications Using ASP.NET Demo: Implementing Personalization and Theme in Web Applications (Contd.) 1. Add Themes to the Web Application • Add a Themes folder to the Web application • Add the DefaultBlue theme to the Web application. • Create a definition for a default button. • Create a definition for a default text box. • Create a definition for an alternative button. • Use the DefaultBlue theme. 2. Implement Personalized Themes a. Add a personalized theme property. b. Add user interface elements for selecting themes. c. Add code for storing and retrieving the selected theme. d. Add code for applying the selected theme. e. Test the personalized theme functionality. Ver. 1.0 Slide 14 of 15
  • 15. Developing Web Applications Using ASP.NET Summary In this session, you learned that: An ASP.NET profile consists of a set of named properties that are stored for each user. A profile provider enables ASP.NET to store and retrieve profiles by using a common API, regardless of the underlying data storage mechanism. A theme is a collection of property settings that enable user to define and apply the look of pages and controls consistently across the pages. An ASP.NET theme consists of the following objects: Stylesheets Skins Supporting images Ver. 1.0 Slide 15 of 15