logo
g Text Version
Beauty & Self
Books & Music
Career
Computers
Education
Family
Food & Wine
Health & Fitness
Hobbies & Crafts
Home & Garden
Money
News & Politics
Relationships
Religion & Spirituality
Sports
Travel & Culture
TV & Movies

dailyclick
Bored? Games!
Nutrition
Postcards
Take a Quiz
Rate My Photo

new
European Travel
Action Movies
Bible Basics
Houseplants
Romance Movies
Creativity
Family Travel


dailyclick
All times in EST

Full Schedule
g
g ASP Site

BellaOnline's ASP Editor

g

InStr ASP String Function


InStr is a commonly used ASP function that allows you to determine where a character or characters falls within a string. This is much like the command loc or mid in other languages. It takes in 2 parameters:

* The string to operate on
* The character or characters to locate

The original string variable is not altered.

Let's say you have a string called UserName which is equal to "Lisa Shea". Now let's say you just want to know where the space falls in the username, so you can cut the string apart into the first name and last name at that point. You would use:

SpaceLoc = InStr(UserName, " ")

The result is that SpaceLoc would be equal to 5. You could then use that knowledge along with the total length of the string (found with the Len function) to use Left and Right to chop up your string.

ASP String Functions

Introduction to ASP Ebook

Download this ebook to get everything you need to know about learning ASP - from a step by step tutorial to function lists, sample code, common errors and solutions, and much more! 101 pages.
Add InStr+ASP+String+Function to Twitter Add InStr+ASP+String+Function to Facebook Add InStr+ASP+String+Function to MySpace Add InStr+ASP+String+Function to Del.icio.us Digg InStr+ASP+String+Function Add InStr+ASP+String+Function to Yahoo My Web Add InStr+ASP+String+Function to Google Bookmarks Add InStr+ASP+String+Function to Stumbleupon Add InStr+ASP+String+Function to Reddit




RSS | Related Articles | Editor's Picks Articles | Top Ten Articles | Previous Features | Site Map


For FREE email updates, subscribe to the ASP Newsletter


Past Issues


print
Printer Friendly
bookmark
Bookmark
tell friend
Tell a Friend
forum
Forum
email
Email Editor


Content copyright © 2014 by Lisa Shea. All rights reserved.
This content was written by Lisa Shea. If you wish to use this content in any manner, you need written permission. Contact Lisa Shea for details.

g


g features
Archives | Site Map

forum
Forum
email
Contact

Past Issues
memberscenter


vote
Poetry
Daily
Weekly
Monthly
Less than Monthly



BellaOnline on Facebook
g


| About BellaOnline | Privacy Policy | Advertising | Become an Editor |
Website copyright © 2014 Minerva WebWorks LLC. All rights reserved.


BellaOnline Editor