-
single quotes and double quotes in ASP
Can any one tell me if when doing a Response.Write,
do single quotation marks need quotes around them, ie
the code:
Response.Write "<SELECT NAME=""manufacturer"" SIZE=15>"
will print: SELECT NAME="manufacturer" SIZE=15>
but what if i wanted to print something like:
<option value="'Frame_A','location_belmont .htm'">Belmont</option>
i keep getting messed up with the single quotes
-
single quotes and double quotes in ASP (reply)
Dave,
I found that ASPdb was unable to support updates of text/string fields containing single quotes until version ASPDB2001.02.21.SP3 was released. Embedded single quotes are now handled correctly.
This is the current behavior I have observed:
Value in Field Value Stored
---------------------- ---------------------------
'AB','CD' AB','CD
AB','CD' AB','CD'
'AB',CD AB',CD
''AB','CD' 'AB','CD'
''AB','CD'' 'AB','CD'
If the string you are placing into the field begins with doubled single quotes, the single quotes are handled correctly (or at least the way I think they ought to be handled).
I have not experienced any problems retrieving values from my DB (SQL Server) which already contained strings with leading and trailing single quotes.
Rick Ryan
------------
Dave Classick at 3/7/01 10:24:44 PM
Can any one tell me if when doing a Response.Write,
do single quotation marks need quotes around them, ie
the code:
Response.Write "<SELECT NAME=""manufacturer"" SIZE=15>"
will print: SELECT NAME="manufacturer" SIZE=15>
but what if i wanted to print something like:
<option value="'Frame_A','location_belmont .htm'">Belmont</option>
i keep getting messed up with the single quotes
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|