Download presentation
Presentation is loading. Please wait.
1
Chapter 2 Interacting with the Customer
Objectives Use of Response Object. Use of Request Object.
2
Response Object Is an Built-in ASP object.
Used to send dynamic content from an ASP page. i.e represents information sent from web server to web browser. Method Used: Write – used to o/p values of functions, variables or string literals. End – used to stop execution of a script.
3
Request Object Represents all content sent from the web browser to a web server. Collections: Query string collection. Form collection ServerVariables collection Cookies collection.
4
1. Using Query string: Query string is the portion of the URL that appears after a question mark. Ex: It is used to pass information to server from browser.
5
2. Form Collection Is an In-Built Asp object.
HTML forms are used to enable customer to register at your web site / or to accept credit card information. To retrieve information from such forms we use form collection of request object.
6
3. Servervariables Collection
Contain assortment of variables that represent browser headers 7 properties of the web server. Servervaribles collection used to determine: Name of current asp page. Last page customer visited . IP address Browser type.
7
Retrieve Name of current asp page
Variables used are: SCRIPT_Name – Virtual Path PATH_TRANSLATED – Physical path. MapPath() – to translate virtual path to physical path.
8
Retrieve Name of last page visited:
Used to return the value of the browser REFERER header. Older browsers do not support this variable. Used as “HTTP_REFERER”. Retrieving customer’s IP Address & Browser Type: IP Address - Variable used is “REMOTE_ADDR”. Browser type–HTTP_USER_AGENT.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.