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

What's hot (20)

PDF
OSMC 2018 | Visualization of your distributed infrastructure by Nicolai Buchwitz
NETWAYS
 
PDF
Data Lessons Learned at Scale
Charlie Reverte
 
PDF
OSMC 2018 | Stream connector: Easily sending events and/or metrics from the C...
NETWAYS
 
PDF
An Introduction to MongoDB
Chamodi Adikaram
 
PDF
Introduction to mongo db
Lawrence Mwai
 
PPTX
Sergejus Barinovas
Darius Leskauskas
 
ODP
Redis IU
Isaiah Edem
 
ODP
Nginx monitoring with graphite
damaex17
 
DOC
Sap bodi bods online training course
Newyorksys.com
 
PDF
Cloud storage: the right way OSS EU 2018
Orit Wasserman
 
PPTX
Cassandra Lunch #59 Functions in Cassandra
Anant Corporation
 
PDF
Scaling xtext
Lieven Lemiengre
 
PPTX
KDB+ Lite
Sayanosauras
 
PDF
Perl Tools for Productivity
Tudor Constantin
 
PDF
Monitoring your shiny new docker environment
Samuel Vandamme
 
PDF
Level of detail 2
Satoru Takagi
 
PDF
Containers and Logging
Eduardo Silva Pereira
 
PDF
Windows Azure Tables e NoSQL
Vinícius Batista de Souza
 
PDF
KDB database (EPAM tech talks, Sofia, April, 2015)
Martin Toshev
 
OSMC 2018 | Visualization of your distributed infrastructure by Nicolai Buchwitz
NETWAYS
 
Data Lessons Learned at Scale
Charlie Reverte
 
OSMC 2018 | Stream connector: Easily sending events and/or metrics from the C...
NETWAYS
 
An Introduction to MongoDB
Chamodi Adikaram
 
Introduction to mongo db
Lawrence Mwai
 
Sergejus Barinovas
Darius Leskauskas
 
Redis IU
Isaiah Edem
 
Nginx monitoring with graphite
damaex17
 
Sap bodi bods online training course
Newyorksys.com
 
Cloud storage: the right way OSS EU 2018
Orit Wasserman
 
Cassandra Lunch #59 Functions in Cassandra
Anant Corporation
 
Scaling xtext
Lieven Lemiengre
 
KDB+ Lite
Sayanosauras
 
Perl Tools for Productivity
Tudor Constantin
 
Monitoring your shiny new docker environment
Samuel Vandamme
 
Level of detail 2
Satoru Takagi
 
Containers and Logging
Eduardo Silva Pereira
 
Windows Azure Tables e NoSQL
Vinícius Batista de Souza
 
KDB database (EPAM tech talks, Sofia, April, 2015)
Martin Toshev
 
Ad

Viewers also liked (17)

PPT
Synapse india dotnet framework development or c
Synapseindiappsdevelopment
 
PPT
Synapseindia android apps application
Synapseindiappsdevelopment
 
PPT
Synapseindia strcture of dotnet development part 1
Synapseindiappsdevelopment
 
PPT
SynapseIndia mobile apps deployment framework architecture
Synapseindiappsdevelopment
 
PPT
SynapseIndia java and .net development
Synapseindiappsdevelopment
 
PPT
SynapseIndia dotnet development ajax client library
Synapseindiappsdevelopment
 
PPT
SynapseIndia dotnet module development part 1
Synapseindiappsdevelopment
 
PPTX
SynapseIndia dotnet development methodologies iterative
Synapseindiappsdevelopment
 
PPT
Synapseindia android apps overview
Synapseindiappsdevelopment
 
PPT
SynapseIndia mobile apps trends, 2013
Synapseindiappsdevelopment
 
PPT
SynapseIndia dotnet development platform overview
Synapseindiappsdevelopment
 
PPT
SynapseIndia drupal presentation on drupal best practices
Synapseindiappsdevelopment
 
PPT
SynapseIndia dotnet development framework
Synapseindiappsdevelopment
 
PPT
Chapter 6 arrays part-1
Synapseindiappsdevelopment
 
PPTX
Synapse india dotnet development overloading operater part 3
Synapseindiappsdevelopment
 
PPT
Synapseindia dot net development computer programming
Synapseindiappsdevelopment
 
PPT
Synapseindia android apps application development
Synapseindiappsdevelopment
 
Synapse india dotnet framework development or c
Synapseindiappsdevelopment
 
Synapseindia android apps application
Synapseindiappsdevelopment
 
Synapseindia strcture of dotnet development part 1
Synapseindiappsdevelopment
 
SynapseIndia mobile apps deployment framework architecture
Synapseindiappsdevelopment
 
SynapseIndia java and .net development
Synapseindiappsdevelopment
 
SynapseIndia dotnet development ajax client library
Synapseindiappsdevelopment
 
SynapseIndia dotnet module development part 1
Synapseindiappsdevelopment
 
SynapseIndia dotnet development methodologies iterative
Synapseindiappsdevelopment
 
Synapseindia android apps overview
Synapseindiappsdevelopment
 
SynapseIndia mobile apps trends, 2013
Synapseindiappsdevelopment
 
SynapseIndia dotnet development platform overview
Synapseindiappsdevelopment
 
SynapseIndia drupal presentation on drupal best practices
Synapseindiappsdevelopment
 
SynapseIndia dotnet development framework
Synapseindiappsdevelopment
 
Chapter 6 arrays part-1
Synapseindiappsdevelopment
 
Synapse india dotnet development overloading operater part 3
Synapseindiappsdevelopment
 
Synapseindia dot net development computer programming
Synapseindiappsdevelopment
 
Synapseindia android apps application development
Synapseindiappsdevelopment
 
Ad

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

PPTX
Unit - 1: ASP.NET Basic
KALIDHASANR
 
PPT
.Net Framework Overview. Fundamentals of .Net Framework
pavankumar47666
 
PPTX
Chapter 1
application developer
 
PPTX
Introduction to ASP NET.pptxIntroduction to ASP NET.pptx
ssuserbf6ebe
 
PPTX
Asp.net
vijilakshmi51
 
PPS
Asp.net new
Ganesh Jaya
 
PPTX
1-.NET Introduction.pptx
RKAggarwal6
 
PPT
Aspintro
ambar chakraborty
 
PPT
Introaspnet
Nagaraju Yajjuvarapu
 
PPTX
Asp.net presentation by gajanand bohra
Gajanand Bohra
 
PDF
Asp.net web application framework management system.pdf
Kamal Acharya
 
PPT
Rupie asp.net
Rupendra Choudhary
 
PPT
Asp dot net final (1)
amelinaahmeti
 
PPT
Asp dot net final (1)
amelinaahmeti
 
PPT
Asp dot net final (1)
Amelina Ahmeti
 
PPTX
Aspnet architecture
phantrithuc
 
PPT
Webhouse
Omprakash Gomaskar
 
PDF
What is ASP.NET and Why do we need it?
Natural Group
 
Unit - 1: ASP.NET Basic
KALIDHASANR
 
.Net Framework Overview. Fundamentals of .Net Framework
pavankumar47666
 
Introduction to ASP NET.pptxIntroduction to ASP NET.pptx
ssuserbf6ebe
 
Asp.net
vijilakshmi51
 
Asp.net new
Ganesh Jaya
 
1-.NET Introduction.pptx
RKAggarwal6
 
Asp.net presentation by gajanand bohra
Gajanand Bohra
 
Asp.net web application framework management system.pdf
Kamal Acharya
 
Rupie asp.net
Rupendra Choudhary
 
Asp dot net final (1)
amelinaahmeti
 
Asp dot net final (1)
amelinaahmeti
 
Asp dot net final (1)
Amelina Ahmeti
 
Aspnet architecture
phantrithuc
 
What is ASP.NET and Why do we need it?
Natural Group
 

More from Synapseindiappsdevelopment (20)

PPTX
Synapse india elance top in demand in it skills
Synapseindiappsdevelopment
 
PPT
SynapseIndia dotnet web development architecture module
Synapseindiappsdevelopment
 
PPT
SynapseIndia dotnet framework library
Synapseindiappsdevelopment
 
PPT
SynapseIndia dotnet web applications development
Synapseindiappsdevelopment
 
PPT
SynapseIndia dotnet website security development
Synapseindiappsdevelopment
 
PPT
SynapseIndia mobile build apps management
Synapseindiappsdevelopment
 
PPT
SynapseIndia mobile apps deployment framework internal architecture
Synapseindiappsdevelopment
 
PPT
SynapseIndia dotnet development panel control
Synapseindiappsdevelopment
 
PPT
SynapseIndia php web development
Synapseindiappsdevelopment
 
PPT
SynapseIndia mobile apps architecture
Synapseindiappsdevelopment
 
PPT
SynapseIndia mobile apps
Synapseindiappsdevelopment
 
PPT
SynapseIndia dotnet development
Synapseindiappsdevelopment
 
PPT
SynapseIndia dotnet client library Development
Synapseindiappsdevelopment
 
PPT
SynapseIndia creating asp controls programatically development
Synapseindiappsdevelopment
 
PPT
SynapseIndia asp.net2.0 ajax Development
Synapseindiappsdevelopment
 
PPT
SynapseIndia drupal presentation on drupal info
Synapseindiappsdevelopment
 
PPT
SynapseIndia drupal presentation on drupal
Synapseindiappsdevelopment
 
PPTX
SynapseIndia dotnet debugging development process
Synapseindiappsdevelopment
 
PPTX
Synapse india sharing info on dotnet framework part1
Synapseindiappsdevelopment
 
PPTX
Synapse india sharing info on dotnet framework part2
Synapseindiappsdevelopment
 
Synapse india elance top in demand in it skills
Synapseindiappsdevelopment
 
SynapseIndia dotnet web development architecture module
Synapseindiappsdevelopment
 
SynapseIndia dotnet framework library
Synapseindiappsdevelopment
 
SynapseIndia dotnet web applications development
Synapseindiappsdevelopment
 
SynapseIndia dotnet website security development
Synapseindiappsdevelopment
 
SynapseIndia mobile build apps management
Synapseindiappsdevelopment
 
SynapseIndia mobile apps deployment framework internal architecture
Synapseindiappsdevelopment
 
SynapseIndia dotnet development panel control
Synapseindiappsdevelopment
 
SynapseIndia php web development
Synapseindiappsdevelopment
 
SynapseIndia mobile apps architecture
Synapseindiappsdevelopment
 
SynapseIndia mobile apps
Synapseindiappsdevelopment
 
SynapseIndia dotnet development
Synapseindiappsdevelopment
 
SynapseIndia dotnet client library Development
Synapseindiappsdevelopment
 
SynapseIndia creating asp controls programatically development
Synapseindiappsdevelopment
 
SynapseIndia asp.net2.0 ajax Development
Synapseindiappsdevelopment
 
SynapseIndia drupal presentation on drupal info
Synapseindiappsdevelopment
 
SynapseIndia drupal presentation on drupal
Synapseindiappsdevelopment
 
SynapseIndia dotnet debugging development process
Synapseindiappsdevelopment
 
Synapse india sharing info on dotnet framework part1
Synapseindiappsdevelopment
 
Synapse india sharing info on dotnet framework part2
Synapseindiappsdevelopment
 

Recently uploaded (20)

PDF
Responsible AI and AI Ethics - By Sylvester Ebhonu
Sylvester Ebhonu
 
PPTX
What-is-the-World-Wide-Web -- Introduction
tonifi9488
 
PDF
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 
PDF
AI-Cloud-Business-Management-Platforms-The-Key-to-Efficiency-Growth.pdf
Artjoker Software Development Company
 
PPTX
Agile Chennai 18-19 July 2025 | Emerging patterns in Agentic AI by Bharani Su...
AgileNetwork
 
PPTX
Dev Dives: Automate, test, and deploy in one place—with Unified Developer Exp...
AndreeaTom
 
PPTX
Applied-Statistics-Mastering-Data-Driven-Decisions.pptx
parmaryashparmaryash
 
PDF
Google I/O Extended 2025 Baku - all ppts
HusseinMalikMammadli
 
PDF
Security features in Dell, HP, and Lenovo PC systems: A research-based compar...
Principled Technologies
 
PDF
Automating ArcGIS Content Discovery with FME: A Real World Use Case
Safe Software
 
PDF
Brief History of Internet - Early Days of Internet
sutharharshit158
 
PPTX
Agile Chennai 18-19 July 2025 Ideathon | AI Powered Microfinance Literacy Gui...
AgileNetwork
 
PDF
OFFOFFBOX™ – A New Era for African Film | Startup Presentation
ambaicciwalkerbrian
 
PDF
CIFDAQ's Market Wrap : Bears Back in Control?
CIFDAQ
 
PPTX
OA presentation.pptx OA presentation.pptx
pateldhruv002338
 
PPTX
The Future of AI & Machine Learning.pptx
pritsen4700
 
PDF
Structs to JSON: How Go Powers REST APIs
Emily Achieng
 
PDF
Oracle AI Vector Search- Getting Started and what's new in 2025- AIOUG Yatra ...
Sandesh Rao
 
PDF
MASTERDECK GRAPHSUMMIT SYDNEY (Public).pdf
Neo4j
 
PDF
Make GenAI investments go further with the Dell AI Factory
Principled Technologies
 
Responsible AI and AI Ethics - By Sylvester Ebhonu
Sylvester Ebhonu
 
What-is-the-World-Wide-Web -- Introduction
tonifi9488
 
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 
AI-Cloud-Business-Management-Platforms-The-Key-to-Efficiency-Growth.pdf
Artjoker Software Development Company
 
Agile Chennai 18-19 July 2025 | Emerging patterns in Agentic AI by Bharani Su...
AgileNetwork
 
Dev Dives: Automate, test, and deploy in one place—with Unified Developer Exp...
AndreeaTom
 
Applied-Statistics-Mastering-Data-Driven-Decisions.pptx
parmaryashparmaryash
 
Google I/O Extended 2025 Baku - all ppts
HusseinMalikMammadli
 
Security features in Dell, HP, and Lenovo PC systems: A research-based compar...
Principled Technologies
 
Automating ArcGIS Content Discovery with FME: A Real World Use Case
Safe Software
 
Brief History of Internet - Early Days of Internet
sutharharshit158
 
Agile Chennai 18-19 July 2025 Ideathon | AI Powered Microfinance Literacy Gui...
AgileNetwork
 
OFFOFFBOX™ – A New Era for African Film | Startup Presentation
ambaicciwalkerbrian
 
CIFDAQ's Market Wrap : Bears Back in Control?
CIFDAQ
 
OA presentation.pptx OA presentation.pptx
pateldhruv002338
 
The Future of AI & Machine Learning.pptx
pritsen4700
 
Structs to JSON: How Go Powers REST APIs
Emily Achieng
 
Oracle AI Vector Search- Getting Started and what's new in 2025- AIOUG Yatra ...
Sandesh Rao
 
MASTERDECK GRAPHSUMMIT SYDNEY (Public).pdf
Neo4j
 
Make GenAI investments go further with the Dell AI Factory
Principled Technologies
 

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>