Adding Active Server Pages |
What are Active Server Pages? |
Displaying Date, Time, and Text |
Using Counters, Variables, and Forms |
Displaying Server Statistics |
Active Server Pages Server-Side Scripting Programmer's Reference |
<% if condition then %> ...statements... [<% else %> ...else-statements...] <% end if %>
where:
Function. Returns the absolute value of n.
Function. Returns a string containing the ASCII character specified by asciicharcode.
For a list of ASCII characters and character codes, see http://www.microsoft.com/workshop/author/newhtml/htmlr018.htm.
Function. Returns the current numeric value of thecounter. If thecounter doesn't exist, counter.get creates it and sets it to 0.
Function. Adds 1 to the current numeric value of thecounter and returns thecounter's new value. If thecounter doesn't exist, counter.increment creates it and sets it to 1.
Function. Returns the current system date as a string.
Function. Extracts the day of the month from thedate and returns it as a number.
Function. Extracts the hour value from thetime and returns it as a number.
Function. Returns a string containing the first n characters of thestring.
Function. Returns the number of characters in thestring.
Function. Extracts the minutes value from thetime and returns it as a number.
Function. Extracts the month value from thedate and returns it as a number.
Function. Returns a string containing the name of the month whose number is specified by themonth.
Function. Each field in the Personal Web Server control panel can be referenced by the function myInfo(fieldname), where fieldname is the corresponding field name in the following list of valid fieldnames:
Function. Returns the current system date and time.
Function. Returns the client browser type as a string.
Function. Returns the client's IP (Internet protocol) address as a string.
Function. Returns the client's domain name as a string.
Function. Returns the domain name of the server as a string. If the server has no domain name, returns the server's IP address as a string.
Procedure. Adds a new HTML header with name headername and value headervalue to the response.
Procedure. Adds the name of the character set (for example, "ISO-LATIN-7") specified by charsetname to the content-type header in the response. Note: This function inserts any string in the header, whether or not it represents a valid character set.
For more information about commonly used character sets, see http://www.microsoft.com/workshop/author/newhtml/htmlr018.htm.
Procedure. Adds the value specified by picslabel to the Pics-label field of the response header.
For more information on ratings, visit http://www.microsoft.com/ie/ie3/ratings.htm.
Procedure. Redirects the current request to one specified by anotherURL.
Function. Returns a string containing the last n characters of thestring.
Function. Extracts the seconds value from thetime and returns it as a number.
Function. Converts thestring from a string to a URL by "escaping" certain characters. For example, each space character is replaced with %20. Returns the URL.
Field Name | Description |
serverVersion | The version of Microsoft Personal Web Server |
startTime | The time the server started up |
startDate | The date the server started up |
freemem | The amount of free memory the server has |
freelowmem | The lowest value for free memory since the server started up |
requeststoday | The number of requests (also called "hits") today. Each time someone views a page on your Web site, that counts as a request. |
visitorstoday | The number of (unique) visitors to the site today. This number will be lower than the number of requests. This is because each visitor makes at least one request, and if someone visits your Web site more than once in a day, only the first visit is counted in visitorstoday. |
requestssincestart | The number of requests since the server started up |
visitorssincestart | The number of visitors since the server started up |
activehttpsessions | The current number of HTTP connections |
highhttpsessions | The highest number of concurrent HTTP connections since the server started |
busyconnections | The total number of connection requests that could not be processed because the server was busy |
refusedconnections | The total number of requests that were refused because the authentication was invalid |
timedoutconnections | The total number of connections closed without a request having been received |
ktransfered | The total number of kilobytes transferred since the server started up |
currentthreads | The current number of threads |
availablethreads | The current number of available threads |
recentvisitors | An HTML list of recent visitors by domain name or IP address. |
popularpages | An HTML list of most-visited pages |
Function. Returns the current system time as a string.
Function. Extracts the time value from thetime and returns it as a string.
Function. Returns -1 if a file exists whose URL is fileurl, 0 otherwise.
Function. Returns -1 if the user is the owner of the Web site. (The owner name and password are set in the Sharing Setup control panel.)
Function. Returns -1 if the plug-in whose name is specified by pluginname exists, 0 if it doesn't exist. (Note: The plug-in's name is not necessarily the same as the name of the file that contains the plug-in.)
Procedure. Processes the contents of a form that's been filled out by a visitor to the Web site.
Function. Returns a random number from -32768 to +32767.
Function. Extracts the weekday value from thedate and returns it as a number.
Function. Returns a string containing the name of the weekday whose number is specified by weekday.
Function. Extracts the year value from thedate and returns it as a number.
The following operators are supported in ASP server-side scripts:
Return to top |