ASP Is Fun

Learning ASP
Free Course
Basics
Functions
SQL Commands
Sample Code

Servers / Setup
Host Reviews
Server Setup
Error Tips

Contract ASP
Development

Intro to ASP



 
Italian Wedding


Mid ASP String Function



Mid is a commonly used ASP function that allows you to extract characters from the center of a string.

Let's say you have a phone number that is always XXX-XXX-XXXX. You need to get just the middle three digits to run a comparison. You could do:

MiddlePart = Mid(TelNumber, 5, 3)

The first parameter is the string you want to examine. The second number is the starting point, and the third number is the number of characters you want to get. The function returns a string.

If you put in

TelNumber = 123-456-7890

Then

MiddlePart = Mid(TelNumber), 5, 3)

Would have MiddlePart set equal to 456.

ASP String Functions


ASP Main Page | ASP Ebooks | Free ASP Course | Contact Lisa
All content copyright © 2008 Minerva WebWorks LLC. All rights reserved.

French Wedding


Free Newsletter!

Ebooks
Intro to ASP
ASP SQL DB
Members
Shopping


Introduction to ASP

Romance Tips
Irish Romance
Italian Romance
French Romance

ASP Poll
How do you handle 500 errors?
I don't
Page does nothing
Displays error
Emails error