faqts : Computers : Programming : Languages : Asp : ASP/VBScript : Language and Syntax

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

45 of 51 people (88%) answered Yes
Recently 7 of 10 people (70%) answered Yes

Entry

how to include special character such as ( " ) into a string

Jul 18th, 2000 18:16
Chris Durkin, Pornthep Kang,


Use the Chr() function to do this. It takes a single argument, which is 
the ASCII character code that you want to create. So Chr(13) would 
return a carriage return. Here is an example using the double quote 
character (code 34):
dim strHref
strHref = "<a href=" & chr(34) & "http://www.faqts.com" & chr(34) & ">"
strHref = strHref & "Click here for FAQTS" & "</a>"
response.write strHref
Related MSDN articles: (the urls are long, you may have to type them)
Chr() function - 
http://msdn.microsoft.com/library/default.asp?URL=/library/wcedoc/mobcha
n/mcscript_15.htm
ANSI Character set - 
http://msdn.microsoft.com/library/devprods/vs6/visualc/vclang/_pluslang_
ansi_character_codes_chart.htm



© 1999-2004 Synop Pty Ltd