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 October 11th, 2005, 04:56 AM
Registered User
 
Join Date: Aug 2005
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default display quotation mark in ASP

hi guys,
how do I display "." by using response.write() in asp? i mean including the quotation mark.

cheers

 
Old October 11th, 2005, 05:23 AM
Friend of Wrox
 
Join Date: Jul 2003
Posts: 683
Thanks: 0
Thanked 1 Time in 1 Post
Default

In VBScript you need to double the quotes to escape them...
Code:
Call Response.Write(""".""")
In JScript, escape them with a backslash...
Code:
Response.Write("\".\"");
HTH,

Chris

 
Old October 31st, 2005, 08:03 AM
Registered User
 
Join Date: Feb 2005
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

The way that I do this in VBScript takes a few extra characters for a line, and is just a personal preference. I use the Chr() function to insert the quote character in the string. The line below would look like:

Code:
Response.Write(Chr(34) & "." & Chr(34))
I don't use it very often, only when I really NEED a quote on the page.



John Cramer
Sgt    USMC





Similar Threads
Thread Thread Starter Forum Replies Last Post
problem unclosed quotation mark. HelpHelp waiwaisan VB Databases Basics 1 January 4th, 2007 05:29 AM
Quotation NEO1976 XML 5 July 19th, 2006 10:00 AM
apostrophes or quotation marks crmpicco Javascript 6 March 21st, 2006 09:01 AM
str_replace for quotation mark starsol Beginning PHP 4 August 21st, 2003 11:25 AM





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