|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
escape characters like "
sorry.. im really new to asp. i never use it but i have to for this one project.
im tryin to do this: response.write("<body topmargin='0' leftmargin='0' onLoad='window.resize('" & width & "', '" & height & "')'>") i need to run it like this though: response.write("<body topmargin='0' leftmargin='0' onLoad="window.resize('" & width & "', '" & height & "')">") in php i can replace it like onLoad = \"window.resize is there something like that in asp? thanks for all your help..i really appreciate it ![]() |
|
#2
|
||||
|
||||
|
Use (&)quot; without the parenthesis. Example:
<% Response.Write("He said, (&)quot;Hey!(&)quot;") %> I'm sorry. This forum won't let me put it how it should be done. Just take out the () around the &. Tell me if you don't get it. I type it right, and it looks like this: ".
__________________
Paul Spangler SpanglerCo www.spanglerco.tk Last edited by spanglerco : November 27th, 2003 at 06:17 PM. |
|
#3
|
|||
|
|||
|
to escape a quote symbol (") in asp you only need to put another quote symbol right next to it
response.write( "he said, ""blah blah blah""") in the middle of the sentence there's 2 which amounts to having a quote symbol displayed, at the end there are 3, 2 to display one quote, the other to end the string. |
|
#4
|
||||
|
||||
|
Microsoft want's you to use entities (& followed by a string such as quot and then ;). It is good to follow this practice.
|
|
#5
|
|||
|
|||
|
Quote:
For html, yes. Server-side asp vbscript won't know what to do with (&)quot though. Double the quotes to embed a quote in a string in vbs like unclefu posted.
__________________
====== Doug G ====== I didn't attend the funeral, but I sent a nice letter saying I approved of it. --Mark Twain |
|
#6
|
||||
|
||||
|
Double quotes are a good way to do it, but I find (&)quot; easier to read in the code.
Quote:
Maybe some ASP servers don't read (&)quot;, but I know all the servers I have tried do support (&)quot;. |
|
#7
|
||||
|
||||
|
Isnt chr(34) a ", it could be a quote or a line feed.
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ASP Programming > escape characters like " |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|