ASP Programming

2021 年 7 月 24 日1220

ASP Document Object Model

The Request object supplies information from a client visitor

(Form, QueryString, ServerVariables, Cookies, ClientCertificate).

Its TotalBytes property provides how much data is transferred each time.

The Response object contains methods for building a response to the client

(End, Redirect, AddHeader, Write, BinaryWrite, Clear, Flush) and the Cookies collection.

Its properties are Buffer, Charset, Expires, ExpiresAbsolute, CacheControl, ContentType, Pics rating, Status line text.

IIS5 added AppendToLog.

ObjectContext method SetAbort triggers the OnTransactionAbort event.

SetComplete transactions triggers the OnTransactionCommit event.

The ASPError object (new since IIS5) exposes properties of the last error

when Server.GetLastError is called, such as the Category and shorter Description or

longer ASPDescription of the error Source and

which Line and Column in the File causing the error.

The Server object also has methods to do HTMLEncode, URLEncode, and MapPath.

Its ScriptTimeout property manages its lifetime.

Application methods Lock and UnLock control availability of objects in

its Contents and StaticObjects collections.

Variables available to all users are defined with Application_OnStart and _OnEnd events.

The Session object holds the CodePage, LCID, SessionId, and Timeout properties pertaining to a particular visitor.

Like the Application object, Contents and StaticObjects collections for each user session

are managed with Abandon and Contents.Remove methods.

0 0