SlideShare a Scribd company logo
ASP OBJECTS
ASP REQUEST OBJECT
 The Request object is used to get information from
a visitor.
 When a browser asks for a page from a server, it is
called a request. The Request object is used to get
information from a visitor. Its collections, properties,
and methods are described below:
COLLECTIONS
Collection Description
ClientCertificate Contains all the field values stored
in the client certificate
Cookies Contains all the cookie values sent
in a HTTP request
Form Contains all the form (input) values
from a form that uses the post
method
QueryString Contains all the variable values in a
HTTP query string
ServerVariables Contains all the server variable
values
PROPERTIES
Property Description
TotalBytes Returns the total number of bytes
the client sent in the body of the
request
COOKIE EXAMPLE
 <%
dim numvisits
response.cookies("NumVisits").Expires=date+365
numvisits=request.cookies("NumVisits")
if numvisits="" then
response.cookies("NumVisits")=1
response.write("Welcome! This is the first time you are visiting this Web page.")
else
response.cookies("NumVisits")=numvisits+1
response.write("You have visited this ")
response.write("Web page " & numvisits)
if numvisits=1 then
response.write " time before!"
else
response.write " times before!"
end if
end if
%>
<!DOCTYPE html>
<html>
<body>
</body>
</html>
METHODS
Method Description
BinaryRead Retrieves the data sent to the
server from the client as part of a
post request and stores it in a safe
array
ASP RESPONSE OBJECT
 The ASP Response object is used to send output to
the user from the server.
COLLECTIONS
Collection Description
Cookies Sets a cookie value. If the cookie
does not exist, it will be created,
and take the value that is specified
PROPERTIES
Property Description
Buffer Specifies whether to buffer the page output or not
CacheControl Sets whether a proxy server can cache the output
generated by ASP or not
Charset Appends the name of a character-set to the content-
type header in the Response object
ContentType Sets the HTTP content type for the Response object
Expires Sets how long (in minutes) a page will be cached on a
browser before it expires
ExpiresAbsolute Sets a date and time when a page cached on a
browser will expire
IsClientConnected Indicates if the client has disconnected from the
server
Pics Appends a value to the PICS label response header
Status Specifies the value of the status line returned by the
server
METHODS
Method Description
AddHeader Adds a new HTTP header and a value
to the HTTP response
AppendToLog Adds a string to the end of the server
log entry
BinaryWrite Writes data directly to the output
without any character conversion
Clear Clears any buffered HTML output
End Stops processing a script, and returns
the current result
Flush Sends buffered HTML output
immediately
Redirect Redirects the user to a different URL
Write Writes a specified string to the output
APPLICATION OBJECT
 A group of ASP files that work together to perform some
purpose is called an application. The Application object
is used to tie these files together.
 The Application object is used to store and access
variables from any page, just like the Session object.
The difference is that ALL users share ONE Application
object (with Sessions there is ONE Session object for
EACH user).
 The Application object holds information that will be
used by many pages in the application (like database
connection information). The information can be
accessed from any page. The information can also be
changed in one place, and the changes will
automatically be reflected on all pages.
COLLECTIONS
Collection Description
Contents Contains all the items appended to
the application through a script
command
StaticObjects Contains all the objects appended
to the application with the HTML
<object> tag
METHODS
Method Description
Contents.Remove Deletes an item from the Contents
collection
Contents.RemoveAll() Deletes all items from the Contents
collection
Lock Prevents other users from
modifying the variables in the
Application object
Unlock Enables other users to modify the
variables in the Application object
(after it has been locked using the
Lock method)
EVENTS
Event Description
Application_OnEnd Occurs when all user sessions are
over, and the application ends
Application_OnStart Occurs before the first new session
is created (when the Application
object is first referenced)
ASP SESSION OBJECT
 When you are working with an application on your computer, you open it,
do some changes and then you close it. This is much like a Session. The
computer knows who you are. It knows when you open the application
and when you close it. However, on the internet there is one problem: the
web server does not know who you are and what you do, because the
HTTP address doesn't maintain state.
 ASP solves this problem by creating a unique cookie for each user. The
cookie is sent to the user's computer and it contains information that
identifies the user. This interface is called the Session object.
 The Session object stores information about, or change settings for a
user session.
 Variables stored in a Session object hold information about one single
user, and are available to all pages in one application. Common
information stored in session variables are name, id, and preferences.
The server creates a new Session object for each new user, and
destroys the Session object when the session expires.
COLLECTIONS
Collection Description
Contents Contains all the items appended to
the session through a script
command
StaticObjects Contains all the objects appended
to the session with the HTML
<object> tag
PROPERTIES
Property Description
CodePage Specifies the character set that will
be used when displaying dynamic
content
LCID Sets or returns an integer that
specifies a location or region.
Contents like date, time, and
currency will be displayed
according to that location or region
SessionID Returns a unique id for each user.
The unique id is generated by the
server
Timeout Sets or returns the timeout period
(in minutes) for the Session object
in this application
METHODS
Method Description
Abandon Destroys a user session
Contents.Remove Deletes an item from the Contents
collection
Contents.RemoveAll() Deletes all items from the Contents
collection
EVENTS
Event Description
Session_OnEnd Occurs when a session ends
Session_OnStart Occurs when a session starts
ASP SERVER OBJECT
 The ASP Server object is used to access properties
and methods on the server.
PROPERTIES
Property Description
ScriptTimeout Sets or returns the maximum
number of seconds a script can run
before it is terminated
METHODS
Method Description
CreateObject Creates an instance of an object
Execute Executes an ASP file from inside
another ASP file
GetLastError() Returns an ASPError object that
describes the error condition that
occurred
HTMLEncode Applies HTML encoding to a
specified string
MapPath Maps a specified path to a physical
path
Transfer Sends (transfers) all the
information created in one ASP file
to a second ASP file
URLEncode Applies URL encoding rules to a
specified string

More Related Content

What's hot

javascript objects
javascript objectsjavascript objects
javascript objects
Vijay Kalyan
 
UML Diagrams
UML DiagramsUML Diagrams
UML Diagrams
Kartik Raghuvanshi
 
Jsp element
Jsp elementJsp element
Jsp element
kamal kotecha
 
State Machine Diagram
State Machine DiagramState Machine Diagram
State Machine Diagram
Niloy Rocker
 
INTRODUCTION TO JSP,JSP LIFE CYCLE, ANATOMY OF JSP PAGE AND JSP PROCESSING
INTRODUCTION TO JSP,JSP LIFE CYCLE, ANATOMY OF JSP PAGE  AND JSP PROCESSINGINTRODUCTION TO JSP,JSP LIFE CYCLE, ANATOMY OF JSP PAGE  AND JSP PROCESSING
INTRODUCTION TO JSP,JSP LIFE CYCLE, ANATOMY OF JSP PAGE AND JSP PROCESSING
Aaqib Hussain
 
Asp.net file types
Asp.net file typesAsp.net file types
Asp.net file types
Siddhesh Palkar
 
Web controls
Web controlsWeb controls
Web controls
Sarthak Varshney
 
Coupling and cohesion
Coupling and cohesionCoupling and cohesion
Coupling and cohesion
Sutha31
 
Unit 3 object analysis-classification
Unit 3 object analysis-classificationUnit 3 object analysis-classification
Unit 3 object analysis-classification
gopal10scs185
 
Peephole optimization techniques in compiler design
Peephole optimization techniques in compiler designPeephole optimization techniques in compiler design
Peephole optimization techniques in compiler design
Anul Chaudhary
 
Ajax
AjaxAjax
Ajax
Tech_MX
 
Design Model & User Interface Design in Software Engineering
Design Model & User Interface Design in Software EngineeringDesign Model & User Interface Design in Software Engineering
Design Model & User Interface Design in Software Engineering
Meghaj Mallick
 
Gof design patterns
Gof design patternsGof design patterns
Gof design patterns
Srikanth R Vaka
 
Java Networking
Java NetworkingJava Networking
Java Networking
Sunil OS
 
Sequence Diagram
Sequence DiagramSequence Diagram
Procedures functions structures in VB.Net
Procedures  functions  structures in VB.NetProcedures  functions  structures in VB.Net
Procedures functions structures in VB.Net
tjunicornfx
 
anatomy of a jsp page & jsp syntax.pptx
anatomy of a jsp page & jsp syntax.pptxanatomy of a jsp page & jsp syntax.pptx
anatomy of a jsp page & jsp syntax.pptx
Sameenafathima4
 
Session bean
Session beanSession bean
Session bean
sandeep54552
 
Identifying classes and objects ooad
Identifying classes and objects ooadIdentifying classes and objects ooad
Identifying classes and objects ooad
Melba Rosalind
 
Context model
Context modelContext model
Context model
Ubaid423
 

What's hot (20)

javascript objects
javascript objectsjavascript objects
javascript objects
 
UML Diagrams
UML DiagramsUML Diagrams
UML Diagrams
 
Jsp element
Jsp elementJsp element
Jsp element
 
State Machine Diagram
State Machine DiagramState Machine Diagram
State Machine Diagram
 
INTRODUCTION TO JSP,JSP LIFE CYCLE, ANATOMY OF JSP PAGE AND JSP PROCESSING
INTRODUCTION TO JSP,JSP LIFE CYCLE, ANATOMY OF JSP PAGE  AND JSP PROCESSINGINTRODUCTION TO JSP,JSP LIFE CYCLE, ANATOMY OF JSP PAGE  AND JSP PROCESSING
INTRODUCTION TO JSP,JSP LIFE CYCLE, ANATOMY OF JSP PAGE AND JSP PROCESSING
 
Asp.net file types
Asp.net file typesAsp.net file types
Asp.net file types
 
Web controls
Web controlsWeb controls
Web controls
 
Coupling and cohesion
Coupling and cohesionCoupling and cohesion
Coupling and cohesion
 
Unit 3 object analysis-classification
Unit 3 object analysis-classificationUnit 3 object analysis-classification
Unit 3 object analysis-classification
 
Peephole optimization techniques in compiler design
Peephole optimization techniques in compiler designPeephole optimization techniques in compiler design
Peephole optimization techniques in compiler design
 
Ajax
AjaxAjax
Ajax
 
Design Model & User Interface Design in Software Engineering
Design Model & User Interface Design in Software EngineeringDesign Model & User Interface Design in Software Engineering
Design Model & User Interface Design in Software Engineering
 
Gof design patterns
Gof design patternsGof design patterns
Gof design patterns
 
Java Networking
Java NetworkingJava Networking
Java Networking
 
Sequence Diagram
Sequence DiagramSequence Diagram
Sequence Diagram
 
Procedures functions structures in VB.Net
Procedures  functions  structures in VB.NetProcedures  functions  structures in VB.Net
Procedures functions structures in VB.Net
 
anatomy of a jsp page & jsp syntax.pptx
anatomy of a jsp page & jsp syntax.pptxanatomy of a jsp page & jsp syntax.pptx
anatomy of a jsp page & jsp syntax.pptx
 
Session bean
Session beanSession bean
Session bean
 
Identifying classes and objects ooad
Identifying classes and objects ooadIdentifying classes and objects ooad
Identifying classes and objects ooad
 
Context model
Context modelContext model
Context model
 

Similar to Asp objects

Active server pages
Active server pagesActive server pages
Active server pages
mcatahir947
 
Lyudmila Zharova: Developing Solutions for SharePoint 2010 Using the Client O...
Lyudmila Zharova: Developing Solutions for SharePoint 2010 Using the Client O...Lyudmila Zharova: Developing Solutions for SharePoint 2010 Using the Client O...
Lyudmila Zharova: Developing Solutions for SharePoint 2010 Using the Client O...
SharePoint Saturday NY
 
Active Server Page - ( ASP )
Active Server Page - ( ASP )Active Server Page - ( ASP )
Active Server Page - ( ASP )
MohitJoshi154
 
Murach: How to transfer data from controllers
Murach: How to transfer data from controllersMurach: How to transfer data from controllers
Murach: How to transfer data from controllers
MahmoudOHassouna
 
Working with Servlets
Working with ServletsWorking with Servlets
Working with Servlets
People Strategists
 
INTRODUCTION TO CLIENT SIDE PROGRAMMING
INTRODUCTION TO CLIENT SIDE PROGRAMMINGINTRODUCTION TO CLIENT SIDE PROGRAMMING
INTRODUCTION TO CLIENT SIDE PROGRAMMING
Prof Ansari
 
GAC Java Presentation_Server Side Include_Cookies_Filters 2022.ppt
GAC Java Presentation_Server Side Include_Cookies_Filters 2022.pptGAC Java Presentation_Server Side Include_Cookies_Filters 2022.ppt
GAC Java Presentation_Server Side Include_Cookies_Filters 2022.ppt
CUO VEERANAN VEERANAN
 
asp_intro.pptx
asp_intro.pptxasp_intro.pptx
asp_intro.pptx
vijayalakshmi257551
 
Asp.Net Ajax Component Development
Asp.Net Ajax Component DevelopmentAsp.Net Ajax Component Development
Asp.Net Ajax Component Development
Chui-Wen Chiu
 
Introduction to ASP.NET MVC
Introduction to ASP.NET MVCIntroduction to ASP.NET MVC
Introduction to ASP.NET MVC
Sunpawet Somsin
 
Mvc acchitecture
Mvc acchitectureMvc acchitecture
Mvc acchitecture
laxmi.katkar
 
4 - Silverlight y SharePoint, por Rodrigo Diaz y Mauricio Angulo
4 - Silverlight y SharePoint, por Rodrigo Diaz y Mauricio Angulo4 - Silverlight y SharePoint, por Rodrigo Diaz y Mauricio Angulo
4 - Silverlight y SharePoint, por Rodrigo Diaz y Mauricio Angulo
Luis Du Solier
 
Murach : How to work with session state and cookies
Murach : How to work with session state and cookiesMurach : How to work with session state and cookies
Murach : How to work with session state and cookies
MahmoudOHassouna
 
Asp.net server control
Asp.net  server controlAsp.net  server control
Asp.net server control
Sireesh K
 
Http programming in play
Http programming in playHttp programming in play
Http programming in play
Knoldus Inc.
 
Adding a view
Adding a viewAdding a view
Adding a view
Nhan Do
 
Web api
Web apiWeb api
Web api
udaiappa
 
Asp
AspAsp
Presentation about html5 css3
Presentation about html5 css3Presentation about html5 css3
Presentation about html5 css3
Gopi A
 
Webservices in SalesForce (part 1)
Webservices in SalesForce (part 1)Webservices in SalesForce (part 1)
Webservices in SalesForce (part 1)
Mindfire Solutions
 

Similar to Asp objects (20)

Active server pages
Active server pagesActive server pages
Active server pages
 
Lyudmila Zharova: Developing Solutions for SharePoint 2010 Using the Client O...
Lyudmila Zharova: Developing Solutions for SharePoint 2010 Using the Client O...Lyudmila Zharova: Developing Solutions for SharePoint 2010 Using the Client O...
Lyudmila Zharova: Developing Solutions for SharePoint 2010 Using the Client O...
 
Active Server Page - ( ASP )
Active Server Page - ( ASP )Active Server Page - ( ASP )
Active Server Page - ( ASP )
 
Murach: How to transfer data from controllers
Murach: How to transfer data from controllersMurach: How to transfer data from controllers
Murach: How to transfer data from controllers
 
Working with Servlets
Working with ServletsWorking with Servlets
Working with Servlets
 
INTRODUCTION TO CLIENT SIDE PROGRAMMING
INTRODUCTION TO CLIENT SIDE PROGRAMMINGINTRODUCTION TO CLIENT SIDE PROGRAMMING
INTRODUCTION TO CLIENT SIDE PROGRAMMING
 
GAC Java Presentation_Server Side Include_Cookies_Filters 2022.ppt
GAC Java Presentation_Server Side Include_Cookies_Filters 2022.pptGAC Java Presentation_Server Side Include_Cookies_Filters 2022.ppt
GAC Java Presentation_Server Side Include_Cookies_Filters 2022.ppt
 
asp_intro.pptx
asp_intro.pptxasp_intro.pptx
asp_intro.pptx
 
Asp.Net Ajax Component Development
Asp.Net Ajax Component DevelopmentAsp.Net Ajax Component Development
Asp.Net Ajax Component Development
 
Introduction to ASP.NET MVC
Introduction to ASP.NET MVCIntroduction to ASP.NET MVC
Introduction to ASP.NET MVC
 
Mvc acchitecture
Mvc acchitectureMvc acchitecture
Mvc acchitecture
 
4 - Silverlight y SharePoint, por Rodrigo Diaz y Mauricio Angulo
4 - Silverlight y SharePoint, por Rodrigo Diaz y Mauricio Angulo4 - Silverlight y SharePoint, por Rodrigo Diaz y Mauricio Angulo
4 - Silverlight y SharePoint, por Rodrigo Diaz y Mauricio Angulo
 
Murach : How to work with session state and cookies
Murach : How to work with session state and cookiesMurach : How to work with session state and cookies
Murach : How to work with session state and cookies
 
Asp.net server control
Asp.net  server controlAsp.net  server control
Asp.net server control
 
Http programming in play
Http programming in playHttp programming in play
Http programming in play
 
Adding a view
Adding a viewAdding a view
Adding a view
 
Web api
Web apiWeb api
Web api
 
Asp
AspAsp
Asp
 
Presentation about html5 css3
Presentation about html5 css3Presentation about html5 css3
Presentation about html5 css3
 
Webservices in SalesForce (part 1)
Webservices in SalesForce (part 1)Webservices in SalesForce (part 1)
Webservices in SalesForce (part 1)
 

Recently uploaded

The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
heathfieldcps1
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
Scholarhat
 
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Dr. Vinod Kumar Kanvaria
 
Advanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docxAdvanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docx
adhitya5119
 
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
IreneSebastianRueco1
 
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptxC1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
mulvey2
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
camakaiclarkmusic
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
Priyankaranawat4
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Excellence Foundation for South Sudan
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
TechSoup
 
PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.
Dr. Shivangi Singh Parihar
 
clinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdfclinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdf
Priyankaranawat4
 
PIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf IslamabadPIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf Islamabad
AyyanKhan40
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
Jean Carlos Nunes Paixão
 
A Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdfA Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdf
Jean Carlos Nunes Paixão
 
How to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold MethodHow to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold Method
Celine George
 
How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17
Celine George
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
Israel Genealogy Research Association
 
The History of Stoke Newington Street Names
The History of Stoke Newington Street NamesThe History of Stoke Newington Street Names
The History of Stoke Newington Street Names
History of Stoke Newington
 
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
National Information Standards Organization (NISO)
 

Recently uploaded (20)

The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
 
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
 
Advanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docxAdvanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docx
 
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
 
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptxC1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
 
Your Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective UpskillingYour Skill Boost Masterclass: Strategies for Effective Upskilling
Your Skill Boost Masterclass: Strategies for Effective Upskilling
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
 
PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.
 
clinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdfclinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdf
 
PIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf IslamabadPIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf Islamabad
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
 
A Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdfA Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdf
 
How to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold MethodHow to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold Method
 
How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
 
The History of Stoke Newington Street Names
The History of Stoke Newington Street NamesThe History of Stoke Newington Street Names
The History of Stoke Newington Street Names
 
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
 

Asp objects

  • 2. ASP REQUEST OBJECT  The Request object is used to get information from a visitor.  When a browser asks for a page from a server, it is called a request. The Request object is used to get information from a visitor. Its collections, properties, and methods are described below:
  • 3. COLLECTIONS Collection Description ClientCertificate Contains all the field values stored in the client certificate Cookies Contains all the cookie values sent in a HTTP request Form Contains all the form (input) values from a form that uses the post method QueryString Contains all the variable values in a HTTP query string ServerVariables Contains all the server variable values
  • 4. PROPERTIES Property Description TotalBytes Returns the total number of bytes the client sent in the body of the request
  • 5. COOKIE EXAMPLE  <% dim numvisits response.cookies("NumVisits").Expires=date+365 numvisits=request.cookies("NumVisits") if numvisits="" then response.cookies("NumVisits")=1 response.write("Welcome! This is the first time you are visiting this Web page.") else response.cookies("NumVisits")=numvisits+1 response.write("You have visited this ") response.write("Web page " & numvisits) if numvisits=1 then response.write " time before!" else response.write " times before!" end if end if %> <!DOCTYPE html> <html> <body> </body> </html>
  • 6. METHODS Method Description BinaryRead Retrieves the data sent to the server from the client as part of a post request and stores it in a safe array
  • 7. ASP RESPONSE OBJECT  The ASP Response object is used to send output to the user from the server.
  • 8. COLLECTIONS Collection Description Cookies Sets a cookie value. If the cookie does not exist, it will be created, and take the value that is specified
  • 9. PROPERTIES Property Description Buffer Specifies whether to buffer the page output or not CacheControl Sets whether a proxy server can cache the output generated by ASP or not Charset Appends the name of a character-set to the content- type header in the Response object ContentType Sets the HTTP content type for the Response object Expires Sets how long (in minutes) a page will be cached on a browser before it expires ExpiresAbsolute Sets a date and time when a page cached on a browser will expire IsClientConnected Indicates if the client has disconnected from the server Pics Appends a value to the PICS label response header Status Specifies the value of the status line returned by the server
  • 10. METHODS Method Description AddHeader Adds a new HTTP header and a value to the HTTP response AppendToLog Adds a string to the end of the server log entry BinaryWrite Writes data directly to the output without any character conversion Clear Clears any buffered HTML output End Stops processing a script, and returns the current result Flush Sends buffered HTML output immediately Redirect Redirects the user to a different URL Write Writes a specified string to the output
  • 11. APPLICATION OBJECT  A group of ASP files that work together to perform some purpose is called an application. The Application object is used to tie these files together.  The Application object is used to store and access variables from any page, just like the Session object. The difference is that ALL users share ONE Application object (with Sessions there is ONE Session object for EACH user).  The Application object holds information that will be used by many pages in the application (like database connection information). The information can be accessed from any page. The information can also be changed in one place, and the changes will automatically be reflected on all pages.
  • 12. COLLECTIONS Collection Description Contents Contains all the items appended to the application through a script command StaticObjects Contains all the objects appended to the application with the HTML <object> tag
  • 13. METHODS Method Description Contents.Remove Deletes an item from the Contents collection Contents.RemoveAll() Deletes all items from the Contents collection Lock Prevents other users from modifying the variables in the Application object Unlock Enables other users to modify the variables in the Application object (after it has been locked using the Lock method)
  • 14. EVENTS Event Description Application_OnEnd Occurs when all user sessions are over, and the application ends Application_OnStart Occurs before the first new session is created (when the Application object is first referenced)
  • 15. ASP SESSION OBJECT  When you are working with an application on your computer, you open it, do some changes and then you close it. This is much like a Session. The computer knows who you are. It knows when you open the application and when you close it. However, on the internet there is one problem: the web server does not know who you are and what you do, because the HTTP address doesn't maintain state.  ASP solves this problem by creating a unique cookie for each user. The cookie is sent to the user's computer and it contains information that identifies the user. This interface is called the Session object.  The Session object stores information about, or change settings for a user session.  Variables stored in a Session object hold information about one single user, and are available to all pages in one application. Common information stored in session variables are name, id, and preferences. The server creates a new Session object for each new user, and destroys the Session object when the session expires.
  • 16. COLLECTIONS Collection Description Contents Contains all the items appended to the session through a script command StaticObjects Contains all the objects appended to the session with the HTML <object> tag
  • 17. PROPERTIES Property Description CodePage Specifies the character set that will be used when displaying dynamic content LCID Sets or returns an integer that specifies a location or region. Contents like date, time, and currency will be displayed according to that location or region SessionID Returns a unique id for each user. The unique id is generated by the server Timeout Sets or returns the timeout period (in minutes) for the Session object in this application
  • 18. METHODS Method Description Abandon Destroys a user session Contents.Remove Deletes an item from the Contents collection Contents.RemoveAll() Deletes all items from the Contents collection
  • 19. EVENTS Event Description Session_OnEnd Occurs when a session ends Session_OnStart Occurs when a session starts
  • 20. ASP SERVER OBJECT  The ASP Server object is used to access properties and methods on the server.
  • 21. PROPERTIES Property Description ScriptTimeout Sets or returns the maximum number of seconds a script can run before it is terminated
  • 22. METHODS Method Description CreateObject Creates an instance of an object Execute Executes an ASP file from inside another ASP file GetLastError() Returns an ASPError object that describes the error condition that occurred HTMLEncode Applies HTML encoding to a specified string MapPath Maps a specified path to a physical path Transfer Sends (transfers) all the information created in one ASP file to a second ASP file URLEncode Applies URL encoding rules to a specified string