Subject: Recognizing an enter stroke
Posted By: PanzarPaw Post Date: 11/15/2003 11:48:18 AM
Now here's a mean one

How to make ASP recognize an Enter Stroke?
Such as a TAB can be recognized by Chr(9)
(  If Letter = Chr(9) Then ...  )

Couldn't find it in any ASCII charts e.g www.ascii.cl
Reply By: planoie Reply Date: 11/15/2003 12:40:23 PM
You can either look for the VBScript constant vbCrLf in the string or look for Chr(10) and Chr(13) together.  It's easiest to use vbCrLf.

Peter
------------------------------------------------------
Work smarter, not harder.
Reply By: PanzarPaw Reply Date: 11/15/2003 6:35:17 PM
Hum interesting ...
The conclusion of a lot of trying was that an enter stroke actually consist of two parts.

Why, I don't really know ..
but I now do know that both Chr(10) and Chr(13) are parts of a singe one enter

When searching and replacing one character at the time, such as in this script I'm currently writing on, an enter will be read as two separate characters. And therefor the translation of an enter will be done in two steps

I think the vbCrLf can represent both these parts.
To make a replace of an enter - you may search for two vbCrLf, or one Chr(10) and one Chr(13)

/Paw
Reply By: PanzarPaw Reply Date: 11/15/2003 7:39:46 PM

vbCrLf =
 VB
 Cr - Carriage Return  - Chr(13)
 Lf - Line Feed        - Chr(10)

Go to topic 6213

Return to index page 1004
Return to index page 1003
Return to index page 1002
Return to index page 1001
Return to index page 1000
Return to index page 999
Return to index page 998
Return to index page 997
Return to index page 996
Return to index page 995