THE INDIA LARGEST WEB DEVELOPER SITE
HTMLCSSJAVASCRIPTSQLPHPBOOTSTRAPJQUERYANGULARXML
 

ASP Examples


Basic

Write text using ASP
Format text with HTML tags

Variables

Create a variable
Create an array
Looping through HTML headers
Time-based greeting using VBScript
Time-based greeting using JavaScript

Date/Time Functions (VBScript)

Date and time
Get the name of a day
Get the name of a month
Get todays' day and month
Countdown to year 3000
Calculate the day which is n days from today
Format date and time
Is this a date?

Some Other Functions (VBScript)

Uppercase or lowercase a string
Trim a string
How to reverse a string?
How to round a number?
A random number
Return a specified number of characters from left/right of a string
Replace some characters in a string
Return a specified number of characters from a string

Procedures

Call a procedure using VBScript in ASP
Call a procedure using JavaScript in ASP
Call a JavaScript procedure and a VBScript procedure using VBScript in ASP

Forms

Interact with a user in a form that uses the "get" method
Interact with a user in a form that uses the "post" method
Interact with a user in a  form with radio buttons

Cookies

Create a welcome cookie

Response Object

Write text using ASP
Format text with HTML tags
Redirect the user to another URL
Random links
Controlling the buffer
Clear the buffer
End a script in the middle of processing
Set how many minutes a page will be cached in a browser before it expires
Set a date/time when a page cached in a browser will expire
Check if the user is still connected
Set the type of content
Set the name of character set

Request Object

Send extra information within a link
A QueryString collection in its simplest use
How to use information from forms
More information from a form
A form collection in its simplest use
How to use information from forms
More information from a form
A form with radio buttons
A form with checkboxes
How to find the visitors' browser type, IP address and more
List all servervariables you can ask for
Welcome cookie
Total number of bytes the user sent

Session Object

Return session id number for a user
Get a session's timeout

Server Object

When was a file last modified?
Open a textfile for reading
Home made hit counter

FileSystem Object

Does a specified file exist?
Does a specified folder exist?
Does a specified drive exist?
Get the name of a specified drive
Get the name of the parent folder of a specified path
Get the file extension
Get the base name of a file or folder

TextStream Object

Read textfile
Read only a part of a textfile
Read one line of a textfile
Read all lines from a textfile
Skip a part of a textfile
Skip a line of a textfile
Return current line-number in a text file
Get column number of the current character in a text file

Drive Object

Get the available space of a specified drive
Get the free space of a specified drive
Get the total size of a specified drive
Get the drive letter of a specified drive
Get the drive type of a specified drive
Get the file system of a specified drive
Is the drive ready?
Get the path of a specified drive
Get the root folder of a specified drive
Get the serialnumber of a specified drive

File Object

When was the file created?
When was the file last modified?
When was the file last accessed?
Return the attributes of a specified file

Dictionary Object

Does a specified key exist?
Return an array of all items
Return an array of all keys
Return the value of an item
Set a key
Return the number of key/item pairs

AdRotator

Display a different image each time a user visits a page

Browser Capabilities

Find the type, capabilities, and version of each browser that visits your site

ContentRotator

Display a different content each time a user visits a page (ASP 3.0)

Content Linking

Build a table of contents
Navigate between pages in a text file

ADO Display

Display records
Display records in an HTML table
Add headers to the HTML table
Add colors to the HTML table

ADO Queries

Display records where "Companyname" starts with an A
Display records where "Companyname" is > E
Display only Spanish customers
Let the user choose filter

ADO Sort

Sort the records on a specified fieldname ascending
Sort the records on a specified fieldname descending
Let the user choose what column to sort on

ADO Recordset Object

GetRows
GetString