Professional Documents
Culture Documents
HTML 5.6
HTML 5.6
HTML 5.6
The following two programs show how to pass/receive information from a HTML form to ASP (.asp) file.
<html>
<head>
<title>
</title>
</head>
<body>
</form>
</body>
</html>
Program 2; Name.asp
<html>
<head>
<title>
</title>
</head>
<body>
</body>
</html>
Program 1 shows how to pass information from an HTML form to an . asp file using the post method.
The action attribute of the form tag specifies the . asp file to which the form information is posted .
when enter button is
File System Objects (FSOS)provide the programmer the facility to manipulate files , dircctories
and drives and are an essential feature for Active Server Pages that persist data.
FOS’s are objects of Microsoft seripting Runtime Library which includes ; File System Object, File,
Folder, Drive and Textstream as follows;
File System Object This object allows the programmer to interact with
files, folders and drives.
Text stream object helps the programmer to read and write text files.
(a) The file system object properties and methods are as follows:
Method Description
Copy File his method copies an existing file.
Copyholder This method copies an existing folder.
Create Folder This method creates a folder
CreateTextFile his method creates a text file.
Delete File This method deletes a file
Delete Folder This method deletes a folder
DreveExists This method tests whether a drive exists or not.
File Exists This method tests whether file exists or not
Folder Exists his method tests whether the folder exists or not.
Get Absolute Path Name This method returns the specified drive.
Get Srive This method returns the specified drive
Get File This method returns the drive name.
Get File Name This method returns the required file.
Get Folder This method returns the file name.
Get Parent Folder Name This method returns the parent folder name
GetTempName This method moves a file.
MoveFile This method creates a string representing a file name
Move Folder This method moves a folder.
Open Text File This method opens an existing text file.
Properties Description
Attributes The value indicating folder’s (read only, hidden , etc) attributes
Date LastAccessed The date when the folder was last modified
Methods
Property Description
5.11
Each time the browser requests a web page. It sends the cookies that the current web site created, and
the serve reads the cookies using the request object as follows;
Example
(i) As cookies stay on the client ‘s computer, space need not be allocated on the web server to
store user –specific information.
(ii) Cookies can save small amount of information for period of time – weeks . months or even
years!
(iii) Cookies can be used to customize a uservisit a web site.
(i) Clinent’s can choose not accept cookies on their computer.
(ii) Cookies are unable to save large objects, arrays or other complex data types as they can
only save string , date or numberic data types.
5.3.7 Session Tracking by ASP
Session are ASP objects on server designed to save each user’s unique date separately and maintain the
duration of user’s visit. Companies often track the pages that people visit using sessions so that they can
display them for advertisements.
The server performs session traking by keeping track of when a specific person visited a site The first
time a client connecs to the server, the server gives the user a unique session ID . Next time whenever
the client msessin IDs stored in the memory and if a match is found, then it uses it Active server pages
use the of minutes a session exists before it expires (the default value for Time – out property is 20
minutes. ).
With cookies, we restried to save only simple data types on the clients computer. But , a session object
can be used to store any type of variable. Event to store arrays. To show this. Create an .. SP page with
the name CreateSession Array . asp follows;
Program; CreateSessionArray.asp
<%
Dim aSentence(4)