Explain ASP (Active Server Pages) and ASP Objects?
https://www.computersprofessor.com/2016/06/explain-asp-active-server-pages-and-asp.html
CGI scripting is failed to fulfill the
client requirements. ASP’s and JSP’s satisfy the client requirements ASP’s was
developed by Microsoft to run along its web server internet information server
(IIS). Both IIS and ASP work on windows operating system. ‘Install’ and
configure, IIS, Apache and ASP is very easy almost everyone can do.
Asp
is very efficient at run
time when compared to
traditional CGI scripting ASP extends
the html page by
embedding serves side scripting in
to a html . These scripts are processed
by suitable web serves and the
processed page send to the browser.
ASP developers will use either java script (or) VB script
as scripting languages.
ASP
Objects:-
Objects are things which
have defined boundaries and whose
internals are usually hide from
the world. Objects provide services
for other parts
of an application through their methods. A methods is just like a
function . ASP technology define
five objects which can be
used in your scripts. All names will start
with a capital letter. All of you have to follow this
convention.
1.Request object
2.Response object
3.Server object
4.Session object
5.Application object.
Request object: -
Asp
contain its built – in object to take a
lot of handling form data.
In
CGI model of web development each programmer must handle requests from uses in
their own way.
ASP
has its own functionality for extracting data from client requests whether sent
with the post and get method.
Data
sent by user is packaged as a request object. The request object may contain a
number of different data items but the most important ones are about cookies
data sent via post. And data sent via get.
Response object:-
After
reading the description of request object you must able to send response.
Response object control the transmission of data from the server to the web
browser.
Using
Response – write() property
of response object dynamically create html. The response object has a Response- Buffer ( ) property which you
can ‘send to’ or to cache’ the page before sending. Cache is important when you
are getting lots of data and want the user to see the whole page rather than
just part of it.
HTML
pages can have an expiry time. This can be set from the ASP script and is
measured in minutes. from the time that the browser receives the page the
expiry time is set through Response –
expires(). Browser’s can be automatically redirected to another site by
using Response –Redirect( ).
Server object:-
The server object holds information about
the web server itself and lets you use some of its functionality. For eg;- you
can set the max time that a script will execute before generating an error.
A
method called Server – HTML Encode()
will convert characters such as “<” into their HTML equivalent such as ‘<’ automatically when you are processing the data from dbase for inclusion in web pages.
Session object:-
‘http’ is
stateless and has no concept of a session. There are two ways of creating
artificial web sessions.
® By adding hidden form fields to form.
® By using cookies.
ASP
provides a third option called a session this uses cookies but they are set by
the server itself not by the programmer and valid only for a limited time Using
Session the following sequence
happens
(1) The user request a page any
cookies are valid for the server are returned along with the page.
(2) If no
cookies are sent a new session is created and a cookie is set on the
browser.
(3) If cookies were sent they are
checked to see if that one is a ASP session ID.
(4) If the cookie has time out a
new session is created and a new cookie is set.
(5) If the cookie is valid and not
timed out the existing session is recreated some memory
Application object:-
This is
used to share data within a web application. It is basically a developer design
set of pages within a site (or) set of sites on one server.
