ASP Is Fun

Learning ASP
Free ASP Course
ASP Basics
ASP Functions
SQL Commands
Sample ASP Code


Servers / Setup
ASP Host Reviews
ASP Server Setup
ASP Error Tips


Contract ASP
ASP Development

Search For:


Intro to ASP


 


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



Bookmark this site so you can reference it any time you have ASP questions in the future!

Add ASP+Functions+ to Twitter Add ASP+Functions+ to Facebook Add ASP+Functions+ to MySpace Add ASP+Functions+ to Del.icio.us Digg ASP+Functions+ Add ASP+Functions+ to Yahoo My Web Add ASP+Functions+ to Google Bookmarks Add ASP+Functions+ to Stumbleupon Add ASP+Functions+ to Reddit



 


Get Emails when this Site is Updated



ASP Ebooks | Free ASP Course |
All content copyright 2014 Minerva WebWorks LLC. All rights reserved.

French Wedding

Free Newsletter!

Ebooks
Intro to ASP
ASP SQL DB
ASP Members
ASP Shopping


Introduction to ASP

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



affiliate_link