Hi
I have a string which has the following format:
34-23
The problem is I want to add 1 to each of the digits, except for the hyphen, and then display the result on the screen. And another problem is that im using ASP Version 2.0.
The code I've tried so far is:
Dim byteChar
Dim paramString
' get the string
paramString = Request("editCode"
' process the first half of the string
For i=0 to 2
' can't use Mid because this is only ASP V2.0
byteChar = right(left(paramString, i), 1)
' add 1 to the character
byteChar = byteChar + 1
' display the result
Response.Write byteChar
Next
Response.Write "-"
' process the second half of the string
For i=3 to 5
' can't use Mid because this is only ASP V2.0
byteChar = right(left(paramString, i), 1)
' add 1 to the character
byteChar = byteChar + 1
' display the result
Response.Write byteChar
Next
The trouble is the above does not work.
Thanks for any help.
I have a string which has the following format:
34-23
The problem is I want to add 1 to each of the digits, except for the hyphen, and then display the result on the screen. And another problem is that im using ASP Version 2.0.
The code I've tried so far is:
Dim byteChar
Dim paramString
' get the string
paramString = Request("editCode"
' process the first half of the string
For i=0 to 2
' can't use Mid because this is only ASP V2.0
byteChar = right(left(paramString, i), 1)
' add 1 to the character
byteChar = byteChar + 1
' display the result
Response.Write byteChar
Next
Response.Write "-"
' process the second half of the string
For i=3 to 5
' can't use Mid because this is only ASP V2.0
byteChar = right(left(paramString, i), 1)
' add 1 to the character
byteChar = byteChar + 1
' display the result
Response.Write byteChar
Next
The trouble is the above does not work.
Thanks for any help.