Wrox Programmer Forums
|
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 15th, 2003, 12:48 PM
Authorized User
 
Join Date: Nov 2003
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default Recognizing an enter stroke

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
 
Old November 15th, 2003, 01:40 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

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.
 
Old November 15th, 2003, 07:35 PM
Authorized User
 
Join Date: Nov 2003
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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
 
Old November 15th, 2003, 08:39 PM
Authorized User
 
Join Date: Nov 2003
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default


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





Similar Threads
Thread Thread Starter Forum Replies Last Post
Enter Key Event (Enter Key Only) Coby Excel VBA 0 February 6th, 2008 09:55 PM
Code not recognizing file type? Addin missing? kalebson Excel VBA 0 March 8th, 2006 10:15 AM
Enter Key rwalker VB How-To 5 April 7th, 2004 11:04 AM
API to disable CTRL ALT DELETE key stroke Dhodie Pro VB 6 2 July 9th, 2003 04:53 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.