Anda di halaman 1dari 12

010009000003820100

000000590100000000
040000000301080005
0000000b0200000000
050000000c021500370
0030000001e0004000
000070104000400000
007010400590100004
10b2000cc0014003600
000000001400360000
000000280000003600
000014000000010004
000000000000000000
000000000000000000
000000000000000000
0000ffffff00cccccc0099
66660099999900ffcccc
00cc999900000000000
000000000000000000
000000000000000000
000000000000000000
000000000111111111
111111111111111111
111111111111111111
111111111012333333
333333333333333333
333333333333333333
333333333320023366
666666666666666666
666666666666666666
666666666633203236
111111111111111111
111111111111111111
111111111111232002
361111111111111111
111111111111111111
111111111111112320
623611111111111111
111111111111111111
111111111111111123
200236111144441164
421241162124412444
214112615442444211
232012361153326326
323322311321366536
246531164134664263
212320523611631115
532113223113253216

311115311641321112
632123201236113611
111321132231132532
163333453116413211
333611232002361136
111113415322321325
321632536532144132
123212112320123611
341111123336123333
133331333355333326
333233331123200236
112342262152211112
211232511221115525
153651122111232042
361116333321111111
111115611111111111
11116211111111232ff
236111115511111111
111111111111111111
111111111111111232
062361111111111111
111111111111111111
111111111111111112
320523611111111111
111111111111111111
111111111111111111
123201234555555555
555555555555555555
555555555555555555
555632ff23333333333
333333333333333333
333333333333333333
333333201122222222
222222222222222222
222222222222222222
222222222ff04000000
2701ffff030000000000
HYPERLINK
"http://aspdoc.indoglob
al.com/Ch8_BuildApp43
.html"
010009000003e20000
000000b90000000000
040000000301080005
0000000b0200000000
050000000c021500170
0030000001e0004000
000070104000400000
007010400b90000004
10b2000cc0014001600

000000001400160000
000000280000001600
000014000000010004
000000000000000000
000000000000000000
000000000000000000
0000ffffff00cccccc0099
666600999999003333
330066666600663333
000000000000000000
000000000000000000
000000000000000000
000000000000111111
111111111111111101
233333333333333333
3332cc2334444444444
444444432032341111
111111111111232cc23
411111111165111112
320423411111111673
51111232cc234111111
167335411123201234
111111673354111123
2cc2341111167335411
111232012341111673
354111111232cc23411
115333511111112320
623411111533651111
11232ff234111111533
651111123207234111
111153365111123200
234111111115335211
123203234111111111
552111123200234111
111111141111123203
234222222222222222
223205233333333333
333333333205122222
222222222222222205
040000002701ffff0300
00000000HYPERLINK
"http://aspdoc.indoglob
al.com/Ch9_ASPBuiltIn2
.html"
010009000003e20000
000000b90000000000
040000000301080005
0000000b0200000000
050000000c021500170
0030000001e0004000

000070104000400000
007010400b90000004
10b2000cc0014001600
000000001400160000
000000280000001600
000014000000010004
000000000000000000
000000000000000000
000000000000000000
0000ffffff00cccccc0099
66660099999900ffcccc
00cc999900333333006
633330066666600000
000000000000000000
000000000000000000
000000000111111111
111111111111101233
333333333333333333
2cc2336666666666666
666432032361111111
111111111532cc23611
111971111111115320
623611119837111111
11532cc236111173337
111111153201236111
1173337111111532cc2
361111117333711111
532012361111111733
371111532cc23611111
114833741115320123
611111148337411115
32ff236111114833741
111153207236111148
337411111153200236
111173374111111153
203236111117741111
111153200236111111
411111111153203234
555555555555555523
205233333333333333
333333203122222222
222222222222205040
000002701ffff0300000
00000HYPERLINK
"http://aspdoc.indoglob
al.com/SunONEActiverS
erverPages4IX.html" \t
"wptoc"
0100090000035a0100
000000310100000000

040000000301080005
0000000b0200000000
050000000c0215002a0
0030000001e0004000
000070104000400000
007010400310100004
10b2000cc0014002900
000000001400290000
000000280000002900
000014000000010004
000000000000000000
000000000000000000
000000000000000000
0000ffffff00cccccc0066
66660099666600ffcccc
00cc999900999999000
000000000000000000
000000000000000000
000000000000000000
000000000111111111
111111111111111111
111111111111110010
101344444444444444
444444444444444444
444444420040404346
666666666666666666
666666666666666664
420040404341111111
111111111111111111
111111111112420060
606341111111111111
111111111111111111
111112420060606341
111111111111111111
111111111111111112
420010101341111677
227116212446611647
627212711112420010
101341111247524114
754664714726414424
611112420010101341
111142124114724116
754211115447111112
420010204341111142
124114724116754444
421747111112420010
101341111142124214
624216754712416474
211112420000000341
111142124444217444

716444224217411112
420060101341111146
115551111556711551
115111511112420040
101341111444211111
111116711111111111
111112420020604341
111111111111111115
111111111111111112
420010104341111111
111111111111111111
111111111112420050
404341111111111111
111111111111111111
111112420010204345
555555555555555555
555555555555555556
420010101344444444
444444444444444444
444444444444420010
406222222222222222
222222222222222222
222222210010204040
000002701ffff0300000
00000
You are here: ASP Built-in Objects Reference

ASP Built-in Objects Reference


Sun ONE Active Server Pages includes built-in or intrinsic objects that
handle many common programming tasks. The objects included in
Sun ONE ASP are Application, ASPError, Request, Response,
Server, and Session. Built-in objects are included on all ASP pages,
and do not need to be created before they can be used. These objects
enable you to avoid much of the overhead associated with complex
Web programming, simplifying development by solving Web-protocol
programming issues.
The built-in objects and their roles are listed in the following table,
and discussed in this section. This section provides basic reference
information about the ASP intrinsic objects. You may wish to consult
additional print and Web resources for more detailed ASP reference
information.
Note

ASP intrinsic objects can now be accessed directly from Java code
using Sun ONE ASP Chili!Beans technology. For more information,

see ASP Servlet Interface.


Object

Description

Application Stores information (variables and objects) needed for all


users of a particular application. Information stored in the
Application object persists for the lifetime of the
application.
ASPError
Reports error information.
Request
Provides access to values passed to the server by the client.
Response
Controls the output from an ASP script to the requesting
client.
Server
Provides access to methods and properties on the server.
These methods and properties typically serve as utility
functions.
Session
Stores information (variables and objects) needed for a
particular user session. Information stored in the Session
object is not discarded when the user jumps between pages
in the application, but instead persists for the entire user
session.
Note

ASP scripts provided in examples are assumed to be enclosed in script delimit


<SCRIPT> delimiters are generally not shown.

1999 - 2012 Stardeveloper.com, All Rights Reserved.

jectContext Object

ectContext object is used to commit or abort transactions. For an .asp page to commit transaction,
SACTION directive should be present in the script.

ntext.method

sDescription

Aborts the transaction initiated by the ASP script.

leteDeclares that there is no reason for the transaction not to complete. So if all the components taking part in th
on also call SetComplete method then the transaction will complete.

Description

actionAbortThis event occurs when the transaction is aborted.

actionCommitThis event occurs when the transactional script's transaction is committed.

quest Object

uest object makes available all the values that client browser passes to the server during an HTTP reque
client browser info, cookie details ( of this domain only ), client certificates ( if accessing through SSL )

collection|property|method (variable)

onsDescription

rtificateMakes us available a collection of values stored in the client certificate that is sent to the HTTP request. It
f interest when the client is requesting secure pages through SSL connection. But before using this collection the
e configured to request client certificates.

Makes us available all the cookies stored in the client browser for this domain.

ection of all the values of Form element in the HTTP request.

ingCollection of variables which are stored in the HTTP query string. Name / value pairs can also be appended to t
end of page name e.g. "http://www.stardeveloper.com/asp_request.asp?author=Faisal+Khan" contains one varia
with a value of 'Faisal Khan'.

riablesContains a collection of predetermined environment variables plus a collection of all the HTTP header value
client browser to the server.

iesDescription

esAn integer read-only value which gives the total number of bytes the client browser is to the server with each re

sDescription

adRetrieves data sent to the server from the client in raw format as part of the POST request. It saves all this data
y.

sponse Object
sponse object is used to send the output back to the client (browser). It includes all the HTTP
es, cookies that will be stored on the client browser and other info about the content being sen

se.collection|property|method

nsDescription
collection used to specify the values of cookies which will be sent back to the client browser.

sDescription

oolean value indicating whether page output is buffered or not. If the page's Response.Buffer property is set to true then the output
not be sent to the client until all the script in that page is processed. Note that in IIS 5, Response.Buffer is by default set to true. So
rn off buffering of your page's output then you will have to set Response.Buffer to false.
trolA string specifying that the output from the ASP should be cached or not. If you want proxy server to cache the output of your
operty to Public or if you don't want to enable caching of your ASP then set it to Private.
string which appends the name of character set to be used to HTTP-content-type header.
ypeA string which specifies the HTTP content type for the response. If Response.ContentType is not specified then by default MIM
" is used.
n integer specifying the duration of time in minutes after which the page expires in the client browser cache.
bsoluteDate / time after which the page cached in the client browser expires and is no longer valid e.g. Response.ExpiresAbsolute =
12:00:00#
onnectedA boolean value indicating whether the client is still connected to this particular page. If this property returns false then th
cessing can be stopped by using Response.End method.
ng which creates PICS header and then adds it to the HTTP headers. It indicates PICS content rating e.g. violence, sex etc.
ring which specifies the value of status line of the server. It is included in HTTP headers of the response. This string should contai
code and a brief explanation for it e.g. "404 File Not Found".

Description

erAdds a custom new HTTP header to the response. Must be used before any text or HTML is sent to the client. Does not replace a
the same name e.g. Response.AddHeader "AUTHENTICATED", "You are now logged on."
oLogA string which is added to the end of the web server log entry for this page e.g. Response.AppendToLog "Your custom log mes
".
iteWrites down the given information to the current HTTP output without any character set conversion. It is useful for writing nonon such as binary data required by an application or for sending bytes to make up an image.
es any existing HTML buffered output from the IIS response buffer. Used to abort the partly completed page.
the processing of the script in the current page and sends the already created content to the client. Further processing of the page is
ds the buffered output immediately to the client. It is opposite to that of Response.Clear which erases the currently buffered content
rts of long pages to the client when Response.Buffer is set to true.
edirects the browser to another page (URL) e.g. Response.Redirect "http://www.stardeveloper.com".
es the specified string to the web page e.g. Response.Write "Hello World!".

ver Object
ver object makes us available the methods and properties of our server ( IIS ).

property|method

iesDescription

meoutAn integer which specifies time in seconds until which the script can run after that the server aborts the scrip
an error message.

sDescription

bjectCreates an instance of the object ( a component, application or a scripting object ). The component can be
ted by giving its CLSID or ProgID in the Server.CreateObject method e.g. Server.CreateObject ("MSWC.MyInfo").

Executes the given .asp page and then returns the control to the page who called the method. Very useful method
sed to execute another .asp page without leaving the current page and then control is passed back to the calling

rrorReturns an ASPError object which can be used to get information about the last error occured in the ASP scrip

codeProvides HTML encoding to a given string. All non-legal HTML characters are converted to their equivalent HT
g. "<" is converted to &lt; .

Maps the specified virtual or relative path into physical path of the server.

Transfers the control of the page to another page specified in the URL. Note that unlike Execute, control of the pag

to the page calling the Server.Transfer method.

deProvides URL encoding to a given string e.g. Server.URLEncode ("http://www.stardeveloper.com") returns http%

Estardeveloper%2Ecom.

sion Object
sion object is automatically created every time client browser access pages from your web sit
object is specific for every user and varies from user to user. It can be used to store variables
for a user and IIS will maintain these variables when the client moves across pages within you
n create and access Session scope variables. You can store user specific preferences within Sess
such as 'font-size, background-color' etc.

at scripts for different Events are to be declared in global.asa file.

.collection|property|method

onsDescription

Contains all the items which have been added to the Session object. You can iterate through the Contents collecti
a list of all the items added or you can retrieve a specific item. Note that it contains all the Session items except th
using <object> element.

ectsContains all the items which have Session scope created using <object> element. As with Session.Contents c
terate through the StaticObjects collection to get a list of items or you can get a specific item out of the StaticObj
n.

iesDescription

eAn integer which defines the code page to be used to display content to the client browser e.g. code page 1252
merican english and most European languages and 932 is used for Japanese kanji.

nds for locale identifier. It is a standard international abbreviation that uniquely identifies the locale e.g. LCID 2057
h locale.

DA long which returns the session identifier for this client browser.

An integer which specifies a time out period in minutes. If the client doesn't refresh or request any page of your si
out period then the server ends the current session. If you do not specify any time out period then by default tim
20 minutes.

sDescription

Destroys the current session object and releases its resources, meaning there by that if the client requests any pa
after Session.Abandon method has been called then a separate session will be started.

.RemoveDeletes the given item from the Session.Contents collection.

.RemoveAllDestroys all the items in the Session.Contents collection.

Description

OnEndThis event occurs when the session is abandoned or times out for a specific user.

OnStartOccurs when a new session is started. All the ASP objects are available for you to use. You can define your
ables here.

Anda mungkin juga menyukai