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

Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
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
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
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
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
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
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
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
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
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
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 

Dernier (20)

Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
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
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
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
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
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
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
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
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
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
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 

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