Solved

Escape character in ASP ?

Posted on 2001-06-08
5
207 Views
Last Modified: 2012-05-04
I have a string :

 This is a "PEN"

How do I assign that string in a ASP variable ?
0
Comment
Question by:johnmemor
5 Comments
 
LVL 18

Expert Comment

by:mgfranz
ID: 6169412
varStr = "THis is a ""PEN""
0
 
LVL 3

Expert Comment

by:ckaneta
ID: 6169415
without quotes
  strvar="This is a PEN"
with quotes
  strvar="This is a ""PEN"""
0
 
LVL 18

Accepted Solution

by:
mgfranz earned 15 total points
ID: 6169417
Oops, varStr = "This is a ""PEN"""

Your'e gunna get a bunch of replies...
0
 
LVL 7

Expert Comment

by:daniel_c
ID: 6169437
Hohoho, another one here:

varStr = "This is a " & chr(34) & "PEN" & chr(34)
0
 
LVL 2

Expert Comment

by:RickHalle
ID: 6170008
<%
Option Explicit
Dim varStr
varStr = "This is a ""PEN"""
%>

Rick
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question