Home  |  Latest News  |  Contribute  |  F.A.Q.  |  Account  |  Scripts | About
Search ASPNut:
 
ASP Reference
Server Variables
ASP Glossary
Related Sites

Free Components

Web Colors
Entities
CSS Level 1
Encode/Decode
Glossary

Our Sponsors
ASP Nuke CMS
Free Auctions
PHP 5 Script
Funktastic Blog
ULost Directory
Team Task

 

 

 

 

 

 

 

 

 

 

 

 

Mid

The Mid function will extract a portion of a string (a sub-string) from a character string. You specify the starting position and, optionally, the number of characters to extract. The function returns the middle length characters of the source string.

If the length parameter is left off, the Mid function will return all characters starting at pos until the end of the source string.

Const sText = "The quick brown fox"
Response.Write "Extract: " & Mid(sText, 5, 11) & "<BR>"
Response.Write "Extract: " & Mid(sText, 11) & "<BR>"


You may notice that when you leave off the length argument, the function behaves much like the Right function. The main difference is that with the right function you tell it how many characters you want and the mid function, you tell it the starting character to extract from.

Orvado, San Diego Web Design

ASP Nuke CMS
Free Open Source
Content Manager
GoSwap Auctions
Buy, Sell
No Fees!

Contact Us | Contribute | About | Site Map



"The man who has no imagination has no wings." - Muhammad Ali

©2012 San Diego Web Design - Orvado Technologies, All Rights Reserved
ASP Nut provides articles and reference documentation for Active Server Page developers.