View Full Version : double quotes

08-21-2005, 09: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>
<td align=center class=row4>The Event had been successfully deleted.</td>

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


08-21-2005, 10: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"

08-22-2005, 03: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>"

08-22-2005, 01: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.