Detail about some objects

Default Image


Write note on the following:


  1. Response Object
  2. ADO Object
  3. DNS
  4. IIS
  5. Global.asa

Response Object


The ASP Response object is used to send output to the user from the
server. Its collections, properties, and methods are described below:


Sets a cookie value. If the cookie does not exist, it will be created, and take the value that is specified.


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


ADO Object


ADO is a Microsoft technology, stands for ActiveX Data Objects, it is
a Microsoft Active-X component, automatically installed with Microsoft
IIS. It is a programming interface to access data in a database


Accessing a Database from an ASP Page


The common way to access a database from inside an ASP page is to:


Create an ADO connection to a database


Open the database connection


Create an ADO recordset


Open the recordset


Extract the data you need from the recordset


Close the recordset


Close the connection


DNS


The Domain Name System (DNS) is a hierarchical decentralized naming
system for computers, services, or other resources connected to the
Internet or a private network. It associates various information with
domain names assigned to each of the participating entities. Most
prominently, it translates more readily memorized domain names to the
numerical IP addresses needed for locating and identifying computer
services and devices with the underlying network protocols. By providing
a worldwide, distributed directory service, the Domain Name System is
an essential component of the functionality on the Internet, that has
been in use since 1985.


IIS


Internet Information Services (IIS, formerly Internet Information
Server) is an extensible web server created by Microsoft for use with
the Windows NT family.[2] IIS supports HTTP, HTTP/2, HTTPS, FTP, FTPS,
SMTP and NNTP. It has been an integral part of the Windows NT family
since Windows NT 4.0, though it may be absent from some editions (e.g.
Windows XP Home edition), and is not active by default.


Global.asa


The Global.asa file is an optional file that can contain declarations
of objects, variables, and methods that can be accessed by every page
in an ASP application. All valid browser scripts (JavaScript, VBScript,
JScript, PerlScript, etc.) can be used within Global.asa.


The Global.asa file can contain only the following:


Application events


Session events


declarations


TypeLibrary declarations


the #include directive


Events in Global.asa


In Global.asa you can tell the application and session objects what
to do when the application/session starts and what to do when the
application/session ends. The code for this is placed in event handlers.
The Global.asa file can contain four types of events:


Application_OnStart – Occurs when the FIRST user calls the first page
in an ASP application. This event occurs after the Web server is
restarted or after the Global.asa file is edited. The “Session_OnStart”
event occurs immediately after this event.


Session_OnStart – This event occurs EVERY time a NEW user requests his or her first page in the ASP application.


Session_OnEnd – This event occurs EVERY time a user ends a session. A
user-session ends after a page has not been requested by the user for a
specified time (by default this is 20 minutes).


Application_OnEnd – This event occurs after the LAST user has ended
the session. Typically, this event occurs when a Web server stops. This
procedure is used to clean up settings after the Application stops, like
delete records or write information to text files.


To get the code of above problem click on this link

Read Count: 3 times

Comments

No comments yet.

Leave a Comment