SlideShare a Scribd company logo
Developing Web Applications Using ASP.NET
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
Objectives
Developing Web Applications Using ASP.NET
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.
Demo: Optimizing Web Application Performance
Developing Web Applications Using ASP.NET
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.
Demo: Optimizing Web Application Performance (Contd.)
Developing Web Applications Using ASP.NET
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.
ASP.NET 2.0 Personalization Features
Developing Web Applications Using ASP.NET
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.
ASP.NET 2.0 Personalization Features (Contd.)
Developing Web Applications Using ASP.NET
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.
ASP.NET 2.0 Personalization Features (Contd.)
Developing Web Applications Using ASP.NET
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;
ASP.NET 2.0 Personalization Features (Contd.)
Developing Web Applications Using ASP.NET
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
Theme Support in ASP.NET 2.0
Developing Web Applications Using ASP.NET
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”/>
Theme Support in ASP.NET 2.0 (Contd.)
Developing Web Applications Using ASP.NET
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>
Theme Support in ASP.NET 2.0 (Contd.)
Developing Web Applications Using ASP.NET
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;
}
}
Theme Support in ASP.NET 2.0 (Contd.)
Developing Web Applications Using ASP.NET
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.
Demo: Implementing Personalization and Theme in Web Applications
Developing Web Applications Using ASP.NET
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.
Demo: Implementing Personalization and Theme in Web Applications (Contd.)
Developing Web Applications Using ASP.NET
3. Add Themes to the Web Application
a. Add a Themes folder to the Web application
b. Add the DefaultBlue theme to the Web application.
c. Create a definition for a default button.
d. Create a definition for a default text box.
e. Create a definition for an alternative button.
f. Use the DefaultBlue theme.
4. 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.
Demo: Implementing Personalization and Theme in Web Applications (Contd.)
Developing Web Applications Using ASP.NET
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
Summary

More Related Content

What's hot

Point and Click App Building Workshop
Point and Click App Building WorkshopPoint and Click App Building Workshop
Point and Click App Building Workshop
Salesforce Developers
 
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
Randy Connolly
 
Oracle apex-hands-on-guide lab#1
Oracle apex-hands-on-guide lab#1Oracle apex-hands-on-guide lab#1
Oracle apex-hands-on-guide lab#1Amit Sharma
 
03 asp.net session04
03 asp.net session0403 asp.net session04
03 asp.net session04
Vivek chan
 
Android app development lesson 1
Android app development lesson 1Android app development lesson 1
Android app development lesson 1
Kalluri Vinay Reddy
 
Chapter 2 lesson-2 styling the action bar
Chapter 2 lesson-2 styling the action barChapter 2 lesson-2 styling the action bar
Chapter 2 lesson-2 styling the action bar
Kalluri Vinay Reddy
 
Salesforce.com Lightning
Salesforce.com LightningSalesforce.com Lightning
Salesforce.com Lightning
Malinda Lamahewa
 
Chapter 2 lesson-1 adding the action bar
Chapter 2 lesson-1 adding the action barChapter 2 lesson-1 adding the action bar
Chapter 2 lesson-1 adding the action bar
Kalluri Vinay Reddy
 
Mybatis spring-1.0.2-reference
Mybatis spring-1.0.2-referenceMybatis spring-1.0.2-reference
Mybatis spring-1.0.2-referenceSergio Avila
 
User and group security migration
User and group security migrationUser and group security migration
User and group security migrationAmit Sharma
 
SharePoint Hosted Add-in with AngularJS and Bootstrap
SharePoint Hosted Add-in with AngularJS and BootstrapSharePoint Hosted Add-in with AngularJS and Bootstrap
SharePoint Hosted Add-in with AngularJS and Bootstrap
Roy Kim
 
Murach: An introduction to web programming with ASP.NET Core MVC
Murach: An introduction to web programming with ASP.NET Core MVCMurach: An introduction to web programming with ASP.NET Core MVC
Murach: An introduction to web programming with ASP.NET Core MVC
MahmoudOHassouna
 
Designing for magento
Designing for magentoDesigning for magento
Designing for magentohainutemicute
 
Create an android app for database creation using.pptx
Create an android app for database creation using.pptxCreate an android app for database creation using.pptx
Create an android app for database creation using.pptx
vishal choudhary
 
3. react - native: component
3. react - native: component3. react - native: component
3. react - native: component
Govind Prasad Gupta
 
Expense personalization
Expense personalizationExpense personalization
Expense personalization
shravan kumar chelika
 
Share point 2010_overview-day4-code
Share point 2010_overview-day4-codeShare point 2010_overview-day4-code
Share point 2010_overview-day4-codeNarayana Reddy
 
11 asp.net session16
11 asp.net session1611 asp.net session16
11 asp.net session16Niit Care
 
LearningMVCWithLINQToSQL
LearningMVCWithLINQToSQLLearningMVCWithLINQToSQL
LearningMVCWithLINQToSQLAkhil Mittal
 
Murach : HOW to work with controllers and routing
Murach : HOW to work with controllers and routingMurach : HOW to work with controllers and routing
Murach : HOW to work with controllers and routing
MahmoudOHassouna
 

What's hot (20)

Point and Click App Building Workshop
Point and Click App Building WorkshopPoint and Click App Building Workshop
Point and Click App Building Workshop
 
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
 
Oracle apex-hands-on-guide lab#1
Oracle apex-hands-on-guide lab#1Oracle apex-hands-on-guide lab#1
Oracle apex-hands-on-guide lab#1
 
03 asp.net session04
03 asp.net session0403 asp.net session04
03 asp.net session04
 
Android app development lesson 1
Android app development lesson 1Android app development lesson 1
Android app development lesson 1
 
Chapter 2 lesson-2 styling the action bar
Chapter 2 lesson-2 styling the action barChapter 2 lesson-2 styling the action bar
Chapter 2 lesson-2 styling the action bar
 
Salesforce.com Lightning
Salesforce.com LightningSalesforce.com Lightning
Salesforce.com Lightning
 
Chapter 2 lesson-1 adding the action bar
Chapter 2 lesson-1 adding the action barChapter 2 lesson-1 adding the action bar
Chapter 2 lesson-1 adding the action bar
 
Mybatis spring-1.0.2-reference
Mybatis spring-1.0.2-referenceMybatis spring-1.0.2-reference
Mybatis spring-1.0.2-reference
 
User and group security migration
User and group security migrationUser and group security migration
User and group security migration
 
SharePoint Hosted Add-in with AngularJS and Bootstrap
SharePoint Hosted Add-in with AngularJS and BootstrapSharePoint Hosted Add-in with AngularJS and Bootstrap
SharePoint Hosted Add-in with AngularJS and Bootstrap
 
Murach: An introduction to web programming with ASP.NET Core MVC
Murach: An introduction to web programming with ASP.NET Core MVCMurach: An introduction to web programming with ASP.NET Core MVC
Murach: An introduction to web programming with ASP.NET Core MVC
 
Designing for magento
Designing for magentoDesigning for magento
Designing for magento
 
Create an android app for database creation using.pptx
Create an android app for database creation using.pptxCreate an android app for database creation using.pptx
Create an android app for database creation using.pptx
 
3. react - native: component
3. react - native: component3. react - native: component
3. react - native: component
 
Expense personalization
Expense personalizationExpense personalization
Expense personalization
 
Share point 2010_overview-day4-code
Share point 2010_overview-day4-codeShare point 2010_overview-day4-code
Share point 2010_overview-day4-code
 
11 asp.net session16
11 asp.net session1611 asp.net session16
11 asp.net session16
 
LearningMVCWithLINQToSQL
LearningMVCWithLINQToSQLLearningMVCWithLINQToSQL
LearningMVCWithLINQToSQL
 
Murach : HOW to work with controllers and routing
Murach : HOW to work with controllers and routingMurach : HOW to work with controllers and routing
Murach : HOW to work with controllers and routing
 

Viewers also liked

12 asp.net session17
12 asp.net session1712 asp.net session17
12 asp.net session17
Vivek chan
 
08 asp.net session11
08 asp.net session1108 asp.net session11
08 asp.net session11
Vivek chan
 
Vivek Chan | Technology Consultant
Vivek Chan | Technology Consultant Vivek Chan | Technology Consultant
Vivek Chan | Technology Consultant
Vivek chan
 
Net framework session01
Net framework session01Net framework session01
Net framework session01
Vivek chan
 
09 intel v_tune_session_13
09 intel v_tune_session_1309 intel v_tune_session_13
09 intel v_tune_session_13
Vivek chan
 
05 asp.net session07
05 asp.net session0705 asp.net session07
05 asp.net session07
Vivek chan
 
16 asp.net session23
16 asp.net session2316 asp.net session23
16 asp.net session23
Vivek chan
 
Vivek Chan | Technology Consultant
Vivek Chan | Technology Consultant Vivek Chan | Technology Consultant
Vivek Chan | Technology Consultant
Vivek chan
 
07 intel v_tune_session_10
07 intel v_tune_session_1007 intel v_tune_session_10
07 intel v_tune_session_10
Vivek chan
 
Net framework session02
Net framework session02Net framework session02
Net framework session02
Vivek chan
 
Wireless Communication via Mobile Phone Using DTMF
Wireless Communication via Mobile Phone Using DTMF Wireless Communication via Mobile Phone Using DTMF
Wireless Communication via Mobile Phone Using DTMF
Vivek chan
 
Series Parallel Circuit presentation for schools and kids
Series Parallel Circuit presentation for schools and kidsSeries Parallel Circuit presentation for schools and kids
Series Parallel Circuit presentation for schools and kids
Vivek chan
 
Complete C programming Language Course
Complete C programming Language CourseComplete C programming Language Course
Complete C programming Language Course
Vivek chan
 
CyberLab TCP/IP and IP Addressing & Subnetting
CyberLab TCP/IP and IP Addressing & SubnettingCyberLab TCP/IP and IP Addressing & Subnetting
CyberLab TCP/IP and IP Addressing & Subnetting
Vivek chan
 

Viewers also liked (14)

12 asp.net session17
12 asp.net session1712 asp.net session17
12 asp.net session17
 
08 asp.net session11
08 asp.net session1108 asp.net session11
08 asp.net session11
 
Vivek Chan | Technology Consultant
Vivek Chan | Technology Consultant Vivek Chan | Technology Consultant
Vivek Chan | Technology Consultant
 
Net framework session01
Net framework session01Net framework session01
Net framework session01
 
09 intel v_tune_session_13
09 intel v_tune_session_1309 intel v_tune_session_13
09 intel v_tune_session_13
 
05 asp.net session07
05 asp.net session0705 asp.net session07
05 asp.net session07
 
16 asp.net session23
16 asp.net session2316 asp.net session23
16 asp.net session23
 
Vivek Chan | Technology Consultant
Vivek Chan | Technology Consultant Vivek Chan | Technology Consultant
Vivek Chan | Technology Consultant
 
07 intel v_tune_session_10
07 intel v_tune_session_1007 intel v_tune_session_10
07 intel v_tune_session_10
 
Net framework session02
Net framework session02Net framework session02
Net framework session02
 
Wireless Communication via Mobile Phone Using DTMF
Wireless Communication via Mobile Phone Using DTMF Wireless Communication via Mobile Phone Using DTMF
Wireless Communication via Mobile Phone Using DTMF
 
Series Parallel Circuit presentation for schools and kids
Series Parallel Circuit presentation for schools and kidsSeries Parallel Circuit presentation for schools and kids
Series Parallel Circuit presentation for schools and kids
 
Complete C programming Language Course
Complete C programming Language CourseComplete C programming Language Course
Complete C programming Language Course
 
CyberLab TCP/IP and IP Addressing & Subnetting
CyberLab TCP/IP and IP Addressing & SubnettingCyberLab TCP/IP and IP Addressing & Subnetting
CyberLab TCP/IP and IP Addressing & Subnetting
 

Similar to 14 asp.net session20

Asp.Net 2.0 Presentation
Asp.Net 2.0 PresentationAsp.Net 2.0 Presentation
Asp.Net 2.0 Presentationsasidhar
 
09 asp.net session13
09 asp.net session1309 asp.net session13
09 asp.net session13
Vivek chan
 
To create a web service
To create a web serviceTo create a web service
To create a web service
Paneliya Prince
 
Writing your own WordPress themes and plugins
Writing your own WordPress themes and pluginsWriting your own WordPress themes and plugins
Writing your own WordPress themes and plugins
Stephanie Wells
 
Asp.net architecture
Asp.net architectureAsp.net architecture
Asp.net architectureIblesoft
 
Tutorial 1
Tutorial 1Tutorial 1
Tutorial 1
Aravindharamanan S
 
vitepress-en.pdf
vitepress-en.pdfvitepress-en.pdf
vitepress-en.pdf
ssuser65180a
 
Microsoft MCPD 70-492 it examen dumps
Microsoft MCPD 70-492 it examen dumpsMicrosoft MCPD 70-492 it examen dumps
Microsoft MCPD 70-492 it examen dumpslilylucy
 
Developing Branding Solutions for 2013
Developing Branding Solutions for 2013Developing Branding Solutions for 2013
Developing Branding Solutions for 2013
Thomas Daly
 
02 asp.net session02
02 asp.net session0202 asp.net session02
02 asp.net session02Mani Chaubey
 
Intro to OctoberCMS
Intro to OctoberCMSIntro to OctoberCMS
Intro to OctoberCMS
Kenton Spence
 
WordPress Custom Fields: Control your content presentation by breaking out of...
WordPress Custom Fields: Control your content presentation by breaking out of...WordPress Custom Fields: Control your content presentation by breaking out of...
WordPress Custom Fields: Control your content presentation by breaking out of...Denise Williams
 
06 asp.net session08
06 asp.net session0806 asp.net session08
06 asp.net session08
Vivek chan
 
Advanced Programming Using Visual Basic. NET
Advanced Programming Using Visual Basic. NETAdvanced Programming Using Visual Basic. NET
Advanced Programming Using Visual Basic. NET
Tony Lisko
 
AD0-E116-demo.pdf
AD0-E116-demo.pdfAD0-E116-demo.pdf
AD0-E116-demo.pdf
Tushar Shinde
 

Similar to 14 asp.net session20 (20)

Asp.Net 2.0 Presentation
Asp.Net 2.0 PresentationAsp.Net 2.0 Presentation
Asp.Net 2.0 Presentation
 
09 asp.net session13
09 asp.net session1309 asp.net session13
09 asp.net session13
 
To create a web service
To create a web serviceTo create a web service
To create a web service
 
2310 b 15
2310 b 152310 b 15
2310 b 15
 
2310 b 15
2310 b 152310 b 15
2310 b 15
 
2310 b 02
2310 b 022310 b 02
2310 b 02
 
Writing your own WordPress themes and plugins
Writing your own WordPress themes and pluginsWriting your own WordPress themes and plugins
Writing your own WordPress themes and plugins
 
Asp.net architecture
Asp.net architectureAsp.net architecture
Asp.net architecture
 
Asp.net w3schools
Asp.net w3schoolsAsp.net w3schools
Asp.net w3schools
 
Tutorial 1
Tutorial 1Tutorial 1
Tutorial 1
 
vitepress-en.pdf
vitepress-en.pdfvitepress-en.pdf
vitepress-en.pdf
 
Microsoft MCPD 70-492 it examen dumps
Microsoft MCPD 70-492 it examen dumpsMicrosoft MCPD 70-492 it examen dumps
Microsoft MCPD 70-492 it examen dumps
 
Developing Branding Solutions for 2013
Developing Branding Solutions for 2013Developing Branding Solutions for 2013
Developing Branding Solutions for 2013
 
32916
3291632916
32916
 
02 asp.net session02
02 asp.net session0202 asp.net session02
02 asp.net session02
 
Intro to OctoberCMS
Intro to OctoberCMSIntro to OctoberCMS
Intro to OctoberCMS
 
WordPress Custom Fields: Control your content presentation by breaking out of...
WordPress Custom Fields: Control your content presentation by breaking out of...WordPress Custom Fields: Control your content presentation by breaking out of...
WordPress Custom Fields: Control your content presentation by breaking out of...
 
06 asp.net session08
06 asp.net session0806 asp.net session08
06 asp.net session08
 
Advanced Programming Using Visual Basic. NET
Advanced Programming Using Visual Basic. NETAdvanced Programming Using Visual Basic. NET
Advanced Programming Using Visual Basic. NET
 
AD0-E116-demo.pdf
AD0-E116-demo.pdfAD0-E116-demo.pdf
AD0-E116-demo.pdf
 

More from Vivek chan

Deceptive Marketing.pdf
Deceptive Marketing.pdfDeceptive Marketing.pdf
Deceptive Marketing.pdf
Vivek chan
 
brain controled wheel chair.pdf
brain controled wheel chair.pdfbrain controled wheel chair.pdf
brain controled wheel chair.pdf
Vivek chan
 
Mechanism of fullerene synthesis in the ARC REACTOR (Vivek Chan 2013)
Mechanism of fullerene synthesis in the ARC REACTOR (Vivek Chan 2013)Mechanism of fullerene synthesis in the ARC REACTOR (Vivek Chan 2013)
Mechanism of fullerene synthesis in the ARC REACTOR (Vivek Chan 2013)
Vivek chan
 
Manav dharma shashtra tatha shashan paddati munshiram jigyasu
Manav dharma shashtra tatha shashan paddati   munshiram jigyasuManav dharma shashtra tatha shashan paddati   munshiram jigyasu
Manav dharma shashtra tatha shashan paddati munshiram jigyasu
Vivek chan
 
Self driving and connected cars fooling sensors and tracking drivers
Self driving and connected cars fooling sensors and tracking driversSelf driving and connected cars fooling sensors and tracking drivers
Self driving and connected cars fooling sensors and tracking drivers
Vivek chan
 
EEG Acquisition Device to Control Wheelchair Using Thoughts
EEG Acquisition Device to Control Wheelchair Using ThoughtsEEG Acquisition Device to Control Wheelchair Using Thoughts
EEG Acquisition Device to Control Wheelchair Using Thoughts
Vivek chan
 
Full Shri Ramcharitmanas in Hindi Complete With Meaning (Ramayana)
Full Shri Ramcharitmanas in Hindi Complete With Meaning (Ramayana)Full Shri Ramcharitmanas in Hindi Complete With Meaning (Ramayana)
Full Shri Ramcharitmanas in Hindi Complete With Meaning (Ramayana)
Vivek chan
 
Net framework session03
Net framework session03Net framework session03
Net framework session03
Vivek chan
 
04 intel v_tune_session_05
04 intel v_tune_session_0504 intel v_tune_session_05
04 intel v_tune_session_05
Vivek chan
 
03 intel v_tune_session_04
03 intel v_tune_session_0403 intel v_tune_session_04
03 intel v_tune_session_04
Vivek chan
 
02 intel v_tune_session_02
02 intel v_tune_session_0202 intel v_tune_session_02
02 intel v_tune_session_02
Vivek chan
 
01 intel v_tune_session_01
01 intel v_tune_session_0101 intel v_tune_session_01
01 intel v_tune_session_01
Vivek chan
 
02 asp.net session02
02 asp.net session0202 asp.net session02
02 asp.net session02
Vivek chan
 
01 asp.net session01
01 asp.net session0101 asp.net session01
01 asp.net session01
Vivek chan
 
15 asp.net session22
15 asp.net session2215 asp.net session22
15 asp.net session22
Vivek chan
 
13 asp.net session19
13 asp.net session1913 asp.net session19
13 asp.net session19
Vivek chan
 
10 asp.net session14
10 asp.net session1410 asp.net session14
10 asp.net session14
Vivek chan
 
07 asp.net session10
07 asp.net session1007 asp.net session10
07 asp.net session10
Vivek chan
 

More from Vivek chan (18)

Deceptive Marketing.pdf
Deceptive Marketing.pdfDeceptive Marketing.pdf
Deceptive Marketing.pdf
 
brain controled wheel chair.pdf
brain controled wheel chair.pdfbrain controled wheel chair.pdf
brain controled wheel chair.pdf
 
Mechanism of fullerene synthesis in the ARC REACTOR (Vivek Chan 2013)
Mechanism of fullerene synthesis in the ARC REACTOR (Vivek Chan 2013)Mechanism of fullerene synthesis in the ARC REACTOR (Vivek Chan 2013)
Mechanism of fullerene synthesis in the ARC REACTOR (Vivek Chan 2013)
 
Manav dharma shashtra tatha shashan paddati munshiram jigyasu
Manav dharma shashtra tatha shashan paddati   munshiram jigyasuManav dharma shashtra tatha shashan paddati   munshiram jigyasu
Manav dharma shashtra tatha shashan paddati munshiram jigyasu
 
Self driving and connected cars fooling sensors and tracking drivers
Self driving and connected cars fooling sensors and tracking driversSelf driving and connected cars fooling sensors and tracking drivers
Self driving and connected cars fooling sensors and tracking drivers
 
EEG Acquisition Device to Control Wheelchair Using Thoughts
EEG Acquisition Device to Control Wheelchair Using ThoughtsEEG Acquisition Device to Control Wheelchair Using Thoughts
EEG Acquisition Device to Control Wheelchair Using Thoughts
 
Full Shri Ramcharitmanas in Hindi Complete With Meaning (Ramayana)
Full Shri Ramcharitmanas in Hindi Complete With Meaning (Ramayana)Full Shri Ramcharitmanas in Hindi Complete With Meaning (Ramayana)
Full Shri Ramcharitmanas in Hindi Complete With Meaning (Ramayana)
 
Net framework session03
Net framework session03Net framework session03
Net framework session03
 
04 intel v_tune_session_05
04 intel v_tune_session_0504 intel v_tune_session_05
04 intel v_tune_session_05
 
03 intel v_tune_session_04
03 intel v_tune_session_0403 intel v_tune_session_04
03 intel v_tune_session_04
 
02 intel v_tune_session_02
02 intel v_tune_session_0202 intel v_tune_session_02
02 intel v_tune_session_02
 
01 intel v_tune_session_01
01 intel v_tune_session_0101 intel v_tune_session_01
01 intel v_tune_session_01
 
02 asp.net session02
02 asp.net session0202 asp.net session02
02 asp.net session02
 
01 asp.net session01
01 asp.net session0101 asp.net session01
01 asp.net session01
 
15 asp.net session22
15 asp.net session2215 asp.net session22
15 asp.net session22
 
13 asp.net session19
13 asp.net session1913 asp.net session19
13 asp.net session19
 
10 asp.net session14
10 asp.net session1410 asp.net session14
10 asp.net session14
 
07 asp.net session10
07 asp.net session1007 asp.net session10
07 asp.net session10
 

Recently uploaded

Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
Atul Kumar Singh
 
How to Break the cycle of negative Thoughts
How to Break the cycle of negative ThoughtsHow to Break the cycle of negative Thoughts
How to Break the cycle of negative Thoughts
Col Mukteshwar Prasad
 
Sectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdfSectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdf
Vivekanand Anglo Vedic Academy
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
Vivekanand Anglo Vedic Academy
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
DeeptiGupta154
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
Jisc
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
siemaillard
 
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
Nguyen Thanh Tu Collection
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
RaedMohamed3
 
Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)
rosedainty
 
Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
Sandy Millin
 
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxStudents, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
EduSkills OECD
 
How to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS ModuleHow to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS Module
Celine George
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdfESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
Fundacja Rozwoju Społeczeństwa Przedsiębiorczego
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
Celine George
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
TechSoup
 

Recently uploaded (20)

Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
 
How to Break the cycle of negative Thoughts
How to Break the cycle of negative ThoughtsHow to Break the cycle of negative Thoughts
How to Break the cycle of negative Thoughts
 
Sectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdfSectors of the Indian Economy - Class 10 Study Notes pdf
Sectors of the Indian Economy - Class 10 Study Notes pdf
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
 
Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)Template Jadual Bertugas Kelas (Boleh Edit)
Template Jadual Bertugas Kelas (Boleh Edit)
 
Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
 
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxStudents, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
 
How to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS ModuleHow to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS Module
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
 
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdfESC Beyond Borders _From EU to You_ InfoPack general.pdf
ESC Beyond Borders _From EU to You_ InfoPack general.pdf
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
 

14 asp.net session20

  • 1. Developing Web Applications Using ASP.NET 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 Objectives
  • 2. Developing Web Applications Using ASP.NET 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. Demo: Optimizing Web Application Performance
  • 3. Developing Web Applications Using ASP.NET 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. Demo: Optimizing Web Application Performance (Contd.)
  • 4. Developing Web Applications Using ASP.NET 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. ASP.NET 2.0 Personalization Features
  • 5. Developing Web Applications Using ASP.NET 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. ASP.NET 2.0 Personalization Features (Contd.)
  • 6. Developing Web Applications Using ASP.NET 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. ASP.NET 2.0 Personalization Features (Contd.)
  • 7. Developing Web Applications Using ASP.NET 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; ASP.NET 2.0 Personalization Features (Contd.)
  • 8. Developing Web Applications Using ASP.NET 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 Theme Support in ASP.NET 2.0
  • 9. Developing Web Applications Using ASP.NET 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”/> Theme Support in ASP.NET 2.0 (Contd.)
  • 10. Developing Web Applications Using ASP.NET 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> Theme Support in ASP.NET 2.0 (Contd.)
  • 11. Developing Web Applications Using ASP.NET 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; } } Theme Support in ASP.NET 2.0 (Contd.)
  • 12. Developing Web Applications Using ASP.NET 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. Demo: Implementing Personalization and Theme in Web Applications
  • 13. Developing Web Applications Using ASP.NET 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. Demo: Implementing Personalization and Theme in Web Applications (Contd.)
  • 14. Developing Web Applications Using ASP.NET 3. Add Themes to the Web Application a. Add a Themes folder to the Web application b. Add the DefaultBlue theme to the Web application. c. Create a definition for a default button. d. Create a definition for a default text box. e. Create a definition for an alternative button. f. Use the DefaultBlue theme. 4. 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. Demo: Implementing Personalization and Theme in Web Applications (Contd.)
  • 15. Developing Web Applications Using ASP.NET 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 Summary