Active Server Page(ASP):-
Active server page is the server side scripting language which helps us to connect with data base of a server from the client.
It is used to pass the information from client to the server and also retrieve the data from server to the client browser. It is based on Visual Basic language.
Asp can be used within a html tag but it should be saved with extension (*.asp) .Infact html page use asp page to connect and execute sql commands.
Asp is called server side scripting language.
Active server page supporting servers ?
a. internet information services(IIS)
b. Personal web server(pws).
c. Apache server (Linux server)
d. Netscape Enterprize Server.
Virtual Directory ?
® Refers to that Directory which is in the Virtual Memory, but cannot be physically accessed from Clients.
® A Location that is mapped in the Server and can be accessed physically only from the Server itself.
® For the clients, it needs to provide the server address to access the directory.
Creating Asp page:-
Process:-
a. open the FrontPage.
b. Save a page in *.Asp extension.
C . open code window then write down as below:-
<%@ language=vbscript%> in the top of the code window.
Eg:-
<%@ language=vbscript%>
<%
response.write “Goodmorning”
%>
D. write down the vbscript in each delimiter in the body section as below.
<%
Vbscript is written here.
%>)
How to Access the ASP Pages?
To open the Asp page we need to follow the following process:-
a. keep the asp page in the web folder to run in the IIS server.
b. Open the internet explorer.
c. Type the address rules wise.
ASP Objects:-
ASP has the following methods or objects to work with its environment.Some important objects are given below:-
v Response
v Request
v Server
v Session
v Application
Response Object:-
This Object is used to send information from the Server to the Clients’ browser
It has the following methods:
®write (“ “)
®expires = 0
®expiresAbsolute = # Date #
®redirect (“URL”)
E.g.
<% Response.write (“Welcome to ASP”) %>
Request Object:-
It is used to access information sent in a request from the Browser to the Server
It has the following collections:
®.QueryString
®.Formcollection
E.g.
Request.QueryString(“name”)
Retrieves the value sent in the variable name from the browser
Server Object:-
It is used to access the methods and properties of the Server
It has the following methods:
®.CreateObject(“Obj_name”)
®.MapP ath (“File_name”)
E.g.
Server.MapPath(“Cust.asp”)
Retrieves the complete Location of that file as:
E:\studentfolder\cseweb\cust.asp
