SlideShare a Scribd company logo
Chapter 23 – ASP.NET 
Outline 
23.1 Introduction 
23.2 .NET Overview 
23.2.1 .NET Framework 
23.2.2 ASP (Active Server Pages) .NET 
23.3 Setup 
23.4 JScript .NET 
23.5 A Simple ASP.NET Example 
23.6 Web Forms 
23.7 Session Tracking 
23.7.1 Cookies 
23.7.2 Session Tracking with HttpSessionState 
23.8 ASP.NET and XML 
23.9 Reading and Writing Text Files 
23.10 Connecting to a Database in ASP.NET 
23.11 Code-Behind Approach 
23.12 ASP.NET Web Services 
23.13 Web Resources
Objectives 
• In this lesson, you will learn: 
– To program ASP.NET pages using JScript .NET. 
– To understand how ASP.NET pages work. 
– To understand the differences between client-side 
scripting and server-side scripting. 
– To create Web services. 
– To use and manipulate XML files with ASP.NET. 
– To understand Web forms and code-behind files. 
– To be able to use session tracking in an 
ASP.NET application. 
– To use ActiveX Data Objects .NET (ADO.NET) 
to access a database.
23.1 Introduction 
• ASP.NET 
– Server-side technology that dynamically builds 
documents in response to client requests 
– Can be used on a server to create Web 
applications 
– Supports over 25 programming languages 
– Object-oriented programming
23.2 .NET Overview 
• Independent from a specific programming 
language 
• Promotes software reuse 
• Include tools for porting, adapting existing 
software components 
• Web services
23.2.1 .NET Framework 
• Manages and executes applications 
• Framework Class Library (FCL) 
– Enforces security and supplies many other 
programming capabilities 
– Reusable components that programmers can 
incorporate into their applications 
• Common Language Runtime (CLR) 
– Executes programs written in any .NET-compatible 
programming language 
• .NET Compact Framework
23.2.2 ASP (Active Server 
Pages) .NET 
• Multi-tier, database-intensive applications 
• Includes optimizations for performance, 
testing and security 
• ASPX files 
• XHTML documents 
– Static
23.3 Setup 
• Microsoft .NET Framework 
• .NET Framework System Development Kit 
(SDK) 
– Tools, examples, reference files and tutorials 
building .NET applications
23.3 Setup 
Fig. 23.1 Adding ASP.NET security permissions to a folder (on the NTFS file system).
23.3 Setup 
Fig. 23.2 Configuring a virtual directory as an application in IIS.
23.4 JScript .NET 
• Truly object-oriented language 
• Backward compatible with JScript 
• Adheres to ECMA 262 Edition 4 standard 
• Provides classes, packages, typed variables 
and access to .NET Framework
23.5 A Simple ASP.NET Example 
• Scripting delimiters <% and %> 
– Wrapped around Jscript.NET code 
– Compiled and executed on the server 
– @ Page directive 
• Specifies information needed by CLR to process file 
– Language attribute 
• Specifies JScript.NET as scripting language 
– runat attribute with value “server” 
• Indicates script should be processed on server
date.aspx 
(1 of 2) 
1 <%@ Page Language="JScript" %> 
2 
3 <!-- Fig. 23.3: date.aspx --> 
4 <!-- A simple ASP.NET example --> 
5 
6 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" 
7 "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> 
8 
9 <html xmlns = "http://www.w3.org/1999/xhtml"> 
10 
11 <head> 
12 <title>A Simple ASP.NET Example</title> 
13 <style type = "text/css"> 
14 td { background-color: black; 
15 color: yellow } 
16 strong { font-family: arial, sans-serif; 
17 font-size: 14pt; color: blue } 
18 p { font-size: 14pt } 
19 </style> 
20 <script runat = "server" language = "JScript"> 
21 var dayAndTime : DateTime = DateTime.Now; 
22 </script> 
23 </head> 
24
date.aspx 
(2 of 2) 
25 <body> 
26 <strong>A Simple ASP.NET Example</strong> 
27 <p> 
28 <table border = "6"> 
29 <tr> 
30 <td> It is 
31 <% Response.Write( dayAndTime.ToShortTimeString() ); %> 
32 </td> 
33 
34 <td> on 
35 <% Response.Write( dayAndTime.ToShortDateString() ); %> 
36 </td> 
37 </tr> 
38 </table> 
39 </p> 
40 </body> 
41 </html>
HTML generated by 
date.aspx 
(1 of 2) 
1 <!-- Fig. 23.3: date.aspx --> 
2 <!-- A Simple ASP.NET example --> 
3 
4 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" 
5 "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> 
6 
7 <html xmlns = "http://www.w3.org/1999/xhtml"> 
8 
9 <head> 
10 <title>A Simple ASP.NET Example</title> 
11 <style type = "text/css"> 
12 td { background-color: black; 
13 color: yellow } 
14 strong { font-family: arial, sans-serif; 
15 font-size: 14pt; color: blue } 
16 p { font-size: 14pt } 
17 </style> 
18 
19 </head> 
20 
21 <body> 
22 <strong>A Simple ASP.NET Example</strong> 
23 <p> 
24 <table border = "6"> 
25 <tr>
HTML generated by 
date.aspx 
(2 of 2) 
26 <td> 
27 It is 5:15 PM 
28 </td> 
29 
30 <td> 
31 on 10/14/2003 
32 </td> 
33 </tr> 
34 </table> 
35 </p> 
36 </body> 
37 </html>

More Related Content

PPTX
Rapid prototyping using azure functions - A walk on the wild side
PDF
Nick Raienko ''Service-oriented GraphQL''
PDF
Building RESTtful services in MEAN
PDF
Timur Shemsedinov "Эволюция архитектуры ИС"
PPTX
Tms training
PDF
JS Fest 2019: Comparing Node.js processes and threads for clustering HTTP, TC...
PPTX
JS Fest 2019/Autumn. Виталий Кухар. Сравнение кластеризации HTTP, TCP и UDP н...
PDF
Temporal Performance Modelling of Serverless Computing Platforms - WoSC6
Rapid prototyping using azure functions - A walk on the wild side
Nick Raienko ''Service-oriented GraphQL''
Building RESTtful services in MEAN
Timur Shemsedinov "Эволюция архитектуры ИС"
Tms training
JS Fest 2019: Comparing Node.js processes and threads for clustering HTTP, TC...
JS Fest 2019/Autumn. Виталий Кухар. Сравнение кластеризации HTTP, TCP и UDP н...
Temporal Performance Modelling of Serverless Computing Platforms - WoSC6

What's hot (20)

PDF
OSMC 2018 | Visualization of your distributed infrastructure by Nicolai Buchwitz
PDF
Data Lessons Learned at Scale
PDF
OSMC 2018 | Stream connector: Easily sending events and/or metrics from the C...
PDF
An Introduction to MongoDB
PDF
Introduction to mongo db
PPTX
Sergejus Barinovas
ODP
Redis IU
ODP
Nginx monitoring with graphite
DOC
Sap bodi bods online training course
PDF
Cloud storage: the right way OSS EU 2018
PPTX
Cassandra Lunch #59 Functions in Cassandra
PDF
Scaling xtext
PPTX
KDB+ Lite
PDF
Perl Tools for Productivity
PDF
Monitoring your shiny new docker environment
PDF
Level of detail 2
PDF
Containers and Logging
PDF
Windows Azure Tables e NoSQL
PDF
KDB database (EPAM tech talks, Sofia, April, 2015)
OSMC 2018 | Visualization of your distributed infrastructure by Nicolai Buchwitz
Data Lessons Learned at Scale
OSMC 2018 | Stream connector: Easily sending events and/or metrics from the C...
An Introduction to MongoDB
Introduction to mongo db
Sergejus Barinovas
Redis IU
Nginx monitoring with graphite
Sap bodi bods online training course
Cloud storage: the right way OSS EU 2018
Cassandra Lunch #59 Functions in Cassandra
Scaling xtext
KDB+ Lite
Perl Tools for Productivity
Monitoring your shiny new docker environment
Level of detail 2
Containers and Logging
Windows Azure Tables e NoSQL
KDB database (EPAM tech talks, Sofia, April, 2015)
Ad

Viewers also liked (20)

PPTX
Los volcanes
PPT
El computador
PDF
Integrando Pessoas Ao Negocio Atraves De Um Portal Colaborativo
PPT
Tema 9 MotivacióN Y Liderazgo
PPT
Manual Lektor
PDF
Avisartikkel fra Sydvesten 18.02.14 - NM-sølv til kokkene på Hospitalet Betanien
PPTX
EXPERIENCIA SIGNIFICATIVA 2010
PPTX
Diapositivas de aspectos fundamentales del proceso (2)
PDF
cooperació 7 desembre
PDF
Sortland Posters - School project
PPTX
Researching the market place
PPTX
Comercio electrónico
PDF
Guía 8515 v1
PPT
Caso PráCtico Tema 2 Pwer
PPTX
.NET Portfolio
PPTX
Expresarte
PPS
Dangersofmotorcycleracing07 15 2008 1
PPT
Pekebok Kjøretøy med lyd
PPTX
Protocolos
Los volcanes
El computador
Integrando Pessoas Ao Negocio Atraves De Um Portal Colaborativo
Tema 9 MotivacióN Y Liderazgo
Manual Lektor
Avisartikkel fra Sydvesten 18.02.14 - NM-sølv til kokkene på Hospitalet Betanien
EXPERIENCIA SIGNIFICATIVA 2010
Diapositivas de aspectos fundamentales del proceso (2)
cooperació 7 desembre
Sortland Posters - School project
Researching the market place
Comercio electrónico
Guía 8515 v1
Caso PráCtico Tema 2 Pwer
.NET Portfolio
Expresarte
Dangersofmotorcycleracing07 15 2008 1
Pekebok Kjøretøy med lyd
Protocolos
Ad

Similar to Synapse india reviews sharing chapter 23 – asp.net (20)

PDF
Apache Samza 1.0 - What's New, What's Next
PPTX
W8/WP8 App Dev for SAP, Part 3B: Developing for Windows Phone 8 and Windows 8
PPT
Migration from ASP to ASP.NET
PPTX
Troubleshooting a XenDesktop Environment using the PowerShell SDK
PPT
Csphtp1 20
PPTX
What's New in .Net 4.5
PPTX
Using MVC with Kentico 8
PPTX
Asp.net With mvc handson
PPTX
Ciklum net sat12112011-roman bugaev-windows azure technology cocktail
PPT
SynapseIndia asp.net2.0 ajax Development
PDF
Ajax Performance Tuning and Best Practices
PPTX
ASP.NET Core 2.1: The Future of Web Apps
PDF
Collector Web Services
PPTX
Whats new in .net core 3
PPTX
ASP.NET Core 2.1: The Future of Web Apps
PPT
PPTX
TO Hack an ASP .NET website?
PPTX
Hack ASP.NET website
PPT
ASP.NET 3.5 SP1 (VSLive San Francisco 2009)
Apache Samza 1.0 - What's New, What's Next
W8/WP8 App Dev for SAP, Part 3B: Developing for Windows Phone 8 and Windows 8
Migration from ASP to ASP.NET
Troubleshooting a XenDesktop Environment using the PowerShell SDK
Csphtp1 20
What's New in .Net 4.5
Using MVC with Kentico 8
Asp.net With mvc handson
Ciklum net sat12112011-roman bugaev-windows azure technology cocktail
SynapseIndia asp.net2.0 ajax Development
Ajax Performance Tuning and Best Practices
ASP.NET Core 2.1: The Future of Web Apps
Collector Web Services
Whats new in .net core 3
ASP.NET Core 2.1: The Future of Web Apps
TO Hack an ASP .NET website?
Hack ASP.NET website
ASP.NET 3.5 SP1 (VSLive San Francisco 2009)

More from SynapseindiaComplaints (11)

PPT
Designing mobile applications
PPT
Introduction to web design
PPT
Synapse india reviews about mobile web development part3
PPT
Synapse india complain sharing info about php chaptr 26
PPT
Synapse india complain sharing info on chapter 8 operator overloading
PPT
Synapse india reviews sharing asp.net
PPT
Synapseindia reviews sharing intro on php
PPT
Synapseindia reviews sharing intro cakephp
PPT
Synapseindia reviews sharing intro on php
PPT
Synapse india complaints on windows 8 developer preview pre-beta
ODP
Synapse india complaints on secure web applications
Designing mobile applications
Introduction to web design
Synapse india reviews about mobile web development part3
Synapse india complain sharing info about php chaptr 26
Synapse india complain sharing info on chapter 8 operator overloading
Synapse india reviews sharing asp.net
Synapseindia reviews sharing intro on php
Synapseindia reviews sharing intro cakephp
Synapseindia reviews sharing intro on php
Synapse india complaints on windows 8 developer preview pre-beta
Synapse india complaints on secure web applications

Recently uploaded (20)

PDF
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PDF
Anesthesia in Laparoscopic Surgery in India
PDF
Complications of Minimal Access Surgery at WLH
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PPTX
Tissue processing ( HISTOPATHOLOGICAL TECHNIQUE
PDF
Microbial disease of the cardiovascular and lymphatic systems
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PPTX
GDM (1) (1).pptx small presentation for students
PDF
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
PDF
GENETICS IN BIOLOGY IN SECONDARY LEVEL FORM 3
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PPTX
Institutional Correction lecture only . . .
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PPTX
Introduction-to-Literarature-and-Literary-Studies-week-Prelim-coverage.pptx
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PDF
VCE English Exam - Section C Student Revision Booklet
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
Abdominal Access Techniques with Prof. Dr. R K Mishra
Anesthesia in Laparoscopic Surgery in India
Complications of Minimal Access Surgery at WLH
FourierSeries-QuestionsWithAnswers(Part-A).pdf
Pharmacology of Heart Failure /Pharmacotherapy of CHF
Tissue processing ( HISTOPATHOLOGICAL TECHNIQUE
Microbial disease of the cardiovascular and lymphatic systems
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
GDM (1) (1).pptx small presentation for students
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
GENETICS IN BIOLOGY IN SECONDARY LEVEL FORM 3
2.FourierTransform-ShortQuestionswithAnswers.pdf
Institutional Correction lecture only . . .
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
Introduction-to-Literarature-and-Literary-Studies-week-Prelim-coverage.pptx
human mycosis Human fungal infections are called human mycosis..pptx
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
102 student loan defaulters named and shamed – Is someone you know on the list?
VCE English Exam - Section C Student Revision Booklet

Synapse india reviews sharing chapter 23 – asp.net

  • 1. Chapter 23 – ASP.NET Outline 23.1 Introduction 23.2 .NET Overview 23.2.1 .NET Framework 23.2.2 ASP (Active Server Pages) .NET 23.3 Setup 23.4 JScript .NET 23.5 A Simple ASP.NET Example 23.6 Web Forms 23.7 Session Tracking 23.7.1 Cookies 23.7.2 Session Tracking with HttpSessionState 23.8 ASP.NET and XML 23.9 Reading and Writing Text Files 23.10 Connecting to a Database in ASP.NET 23.11 Code-Behind Approach 23.12 ASP.NET Web Services 23.13 Web Resources
  • 2. Objectives • In this lesson, you will learn: – To program ASP.NET pages using JScript .NET. – To understand how ASP.NET pages work. – To understand the differences between client-side scripting and server-side scripting. – To create Web services. – To use and manipulate XML files with ASP.NET. – To understand Web forms and code-behind files. – To be able to use session tracking in an ASP.NET application. – To use ActiveX Data Objects .NET (ADO.NET) to access a database.
  • 3. 23.1 Introduction • ASP.NET – Server-side technology that dynamically builds documents in response to client requests – Can be used on a server to create Web applications – Supports over 25 programming languages – Object-oriented programming
  • 4. 23.2 .NET Overview • Independent from a specific programming language • Promotes software reuse • Include tools for porting, adapting existing software components • Web services
  • 5. 23.2.1 .NET Framework • Manages and executes applications • Framework Class Library (FCL) – Enforces security and supplies many other programming capabilities – Reusable components that programmers can incorporate into their applications • Common Language Runtime (CLR) – Executes programs written in any .NET-compatible programming language • .NET Compact Framework
  • 6. 23.2.2 ASP (Active Server Pages) .NET • Multi-tier, database-intensive applications • Includes optimizations for performance, testing and security • ASPX files • XHTML documents – Static
  • 7. 23.3 Setup • Microsoft .NET Framework • .NET Framework System Development Kit (SDK) – Tools, examples, reference files and tutorials building .NET applications
  • 8. 23.3 Setup Fig. 23.1 Adding ASP.NET security permissions to a folder (on the NTFS file system).
  • 9. 23.3 Setup Fig. 23.2 Configuring a virtual directory as an application in IIS.
  • 10. 23.4 JScript .NET • Truly object-oriented language • Backward compatible with JScript • Adheres to ECMA 262 Edition 4 standard • Provides classes, packages, typed variables and access to .NET Framework
  • 11. 23.5 A Simple ASP.NET Example • Scripting delimiters <% and %> – Wrapped around Jscript.NET code – Compiled and executed on the server – @ Page directive • Specifies information needed by CLR to process file – Language attribute • Specifies JScript.NET as scripting language – runat attribute with value “server” • Indicates script should be processed on server
  • 12. date.aspx (1 of 2) 1 <%@ Page Language="JScript" %> 2 3 <!-- Fig. 23.3: date.aspx --> 4 <!-- A simple ASP.NET example --> 5 6 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" 7 "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> 8 9 <html xmlns = "http://www.w3.org/1999/xhtml"> 10 11 <head> 12 <title>A Simple ASP.NET Example</title> 13 <style type = "text/css"> 14 td { background-color: black; 15 color: yellow } 16 strong { font-family: arial, sans-serif; 17 font-size: 14pt; color: blue } 18 p { font-size: 14pt } 19 </style> 20 <script runat = "server" language = "JScript"> 21 var dayAndTime : DateTime = DateTime.Now; 22 </script> 23 </head> 24
  • 13. date.aspx (2 of 2) 25 <body> 26 <strong>A Simple ASP.NET Example</strong> 27 <p> 28 <table border = "6"> 29 <tr> 30 <td> It is 31 <% Response.Write( dayAndTime.ToShortTimeString() ); %> 32 </td> 33 34 <td> on 35 <% Response.Write( dayAndTime.ToShortDateString() ); %> 36 </td> 37 </tr> 38 </table> 39 </p> 40 </body> 41 </html>
  • 14. HTML generated by date.aspx (1 of 2) 1 <!-- Fig. 23.3: date.aspx --> 2 <!-- A Simple ASP.NET example --> 3 4 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" 5 "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> 6 7 <html xmlns = "http://www.w3.org/1999/xhtml"> 8 9 <head> 10 <title>A Simple ASP.NET Example</title> 11 <style type = "text/css"> 12 td { background-color: black; 13 color: yellow } 14 strong { font-family: arial, sans-serif; 15 font-size: 14pt; color: blue } 16 p { font-size: 14pt } 17 </style> 18 19 </head> 20 21 <body> 22 <strong>A Simple ASP.NET Example</strong> 23 <p> 24 <table border = "6"> 25 <tr>
  • 15. HTML generated by date.aspx (2 of 2) 26 <td> 27 It is 5:15 PM 28 </td> 29 30 <td> 31 on 10/14/2003 32 </td> 33 </tr> 34 </table> 35 </p> 36 </body> 37 </html>