CByte
The CByte function will convert an ASP variant variable into
a byte type. The byte type holds a numeric value from 0 to 255.
If an error occurs converting the value into a byte, the script will
throw a runtime error. You can avoid this by creating an error handler
around your conversion method as shown below:
Dim sValue Dim nValue
sValue = 34.5 On Error Resume Next nValue = CByte(sValue) If Err.Number <> 0 Response.Write "An error occurred converting to byte: " & sValue End If On Error Goto 0
|
 |

|