|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
how to detect variable's type in asp??Such as integer,string...It exists a same function in vba which name called "vartype"...Thx for anyone's reply and help!
![]()
__________________
Being a Code Headman !
|
|
#2
|
|||
|
|||
|
i dunno if there's a function that returns the data type but you can use isString, isBoolean, isNumeric, etc... to check that a variable matches that data type
|
|
#3
|
|||
|
|||
|
Thx for your fast relpy!But can u give me some sample about how to use these function to handle variable submited from a form input in a html page..Thx again!
|
|
#4
|
|||
|
|||
|
TypeName(xxx), where xxx is your variable name
__________________
Hope this helps. Mike Royal Selangor Pewter "I have not failed. I've just found 10,000 ways that won't work." - Thomas Alva Edison (1847-1931) |
|
#5
|
|||
|
|||
|
|
|
#6
|
|||
|
|||
|
THx for your reply and help!!But i will judge the source type of the string which use cstr function to transfer as string..As it:
dim i as integer dim i_str as string i=100 i_str=cstr(i) ... I will get the source type of the i_str:integer!! |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ASP Programming > how to detect variable's type in asp?? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|