Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Determine if a character is a digit
Message
From
21/05/2001 10:46:47
 
 
To
21/05/2001 10:44:35
Bob Tracy
Independent Consultant
Driftwood, Texas, United States
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00509416
Message ID:
00509455
Views:
16
>>Assuming I have a string which contains a character. What ASP function should I use to determine if that character is a digit?
>
>Michel,
>
>You can use the ASC() function to test if the ASCII code for the character is in the range of 48 to 57 (decimal) or 30 to39 (hex) which corresponds to numeric characters 0 thru 9.

I was originally using an approach such as If lcString>='1' AND lcString<='9' Then, but then, I obtained the answer in the other message to use IsNumeric().
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Reply
Map
View

Click here to load this message in the networking platform