Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old November 15th, 2003, 12:48 PM
Authorized User
 
Join Date: Nov 2003
Location: Stockholm, , Sweden.
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
Reply With Quote
  #2 (permalink)  
Old November 15th, 2003, 01:40 PM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
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.
Reply With Quote
  #3 (permalink)  
Old November 15th, 2003, 07:35 PM
Authorized User
 
Join Date: Nov 2003
Location: Stockholm, , Sweden.
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
Reply With Quote
  #4 (permalink)  
Old November 15th, 2003, 08:39 PM
Authorized User
 
Join Date: Nov 2003
Location: Stockholm, , Sweden.
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default


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


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 08:42 AM.


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