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
Bible Basics
Houseplants
Romance Movies
Creativity
Family Travel
Southwest USA
Irish Culture


dailyclick
All times in EST

Full Schedule
g
g ASP Site

BellaOnline's ASP Editor

g

ASC ASP String Function


The Asc function might seem obscure at first - who wants to know the ascii code for characters? But this actually can become quite important in data processing.

Sure, if you're wondering if a character is the letter A you can just do a straight comparison

if LetterInput = "A" then ...

but there are special characters that can end up in strings that are much harder to test for. The two most notorious are the carriage return and the line feed. These are ascii strings 10 and 13. They can cause all sorts of formatting problems and cause your parsing to go haywire.

To use the Asc function, you feed in a character and it returns the numeric ascii ID of that character.

CodeNum = Asc(LetterInput)
if CodeNum = 10 or CodeNum = 13 then response.write "Invalid Entry"

ASP and HTML ASCII Chart

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 ASC+ASP+String+Function to Twitter Add ASC+ASP+String+Function to Facebook Add ASC+ASP+String+Function to MySpace Add ASC+ASP+String+Function to Del.icio.us Digg ASC+ASP+String+Function Add ASC+ASP+String+Function to Yahoo My Web Add ASC+ASP+String+Function to Google Bookmarks Add ASC+ASP+String+Function to Stumbleupon Add ASC+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