...

View Full Version : double quotes



mivec
08-21-2005, 08:53 AM
i have a problem in double quotes and single quotes....here is the code:



response.Write "<br><table width=100% border=0 align=center>
<tr>
<td align=center class=row4>The Event had been successfully deleted.</td>
</tr>
</table>"


i am getting this error from it:



Error Type:
Microsoft VBScript compilation (0x800A0409)
Unterminated string constant
/eventView.asp, line 333, column 60
response.Write "<br><table width=100% border=0 align=center>


whats the problem? i tried using single quote to bring out the 100% character but i think i still can't find the solution...pls pls help....thanks

cheers

ostoles
08-21-2005, 09:49 AM
String need to be terminated at the end of the line. You can get around this by doing the following...


response.write "ln1 text " _
& "ln2 cont.. from ln1 text"

Bullschmidt
08-22-2005, 02:44 AM
And could perhaps change this:

response.Write "<br><table width=100% border=0 align=center>

To be this instead:

response.Write "<br><table width=100% border=0 align=center>"

Cyberlord
08-22-2005, 12:36 PM
Tip: to print double quotes in asp-code:

<%
response.Write "<br><table width=""100%"" border=""0"" align=""center"">"
%>

Its useful for javascript codes.


cheers



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum