Hi,

Quick question...if I have a string (let's say it just consisted of
"123"), what would be the vbscript syntax to output the corresponding
ascii chars to the screen - e.g. in this example to programmatically
derive an output of "061 062 063"...?

Obviously the other way round would be response.write chr(61) & chr(62)
& chr(63), but I don't know the converse

Thanks for any assistance

Re: Convert string to corresponding ASCII character by mayayana

mayayana
Mon Apr 10 08:08:43 CDT 2006

For i = 1 to Len(string)
newstring = newstring & CStr(Asc(Mid(string, i, 1))) & " "
Next

>
> Quick question...if I have a string (let's say it just consisted of
> "123"), what would be the vbscript syntax to output the corresponding
> ascii chars to the screen - e.g. in this example to programmatically
> derive an output of "061 062 063"...?
>
> Obviously the other way round would be response.write chr(61) & chr(62)
> & chr(63), but I don't know the converse
>
> Thanks for any assistance
>