Home All Groups Group Topic Archive Search About

Error (0x800A0401) Expected end of statement



Author
20 Mar 2006 8:28 AM
Dax
Hi,
during the creation of an HTML page using asp variable I have this
problem:
Microsoft VBScript compilation (0x800A0401) Expected end of statement
/asp/pages/connect1_1.asp, line 27, column 35
strtable = strtable & "<tr valign="top">" &

The code is the following:
dim strtable
strtable = "<table border=1 width=100% >"

strtable = strtable & "<tr valign="top">" &
           "<td width="51" bgcolor="#0488EC">CODICE</td>" &
           "<td width="51" bgcolor="#0488EC">PRODOTTO</td>" &
           "<td width="51" bgcolor="#0488EC">QTA MASSIMA</td>" &
           "<td width="51" bgcolor="#0488EC">QTA RICHIESTA</td>" &
           "</tr>"

How can I put inside an ASP variable HTML code?

Thanks in advance.
Dax

Author
20 Mar 2006 9:00 AM
dany
Dax schreef:
Show quote
> Hi,
> during the creation of an HTML page using asp variable I have this
> problem:
> Microsoft VBScript compilation (0x800A0401) Expected end of statement
> /asp/pages/connect1_1.asp, line 27, column 35
> strtable = strtable & "<tr valign="top">" &
>
> The code is the following:
> dim strtable
> strtable = "<table border=1 width=100% >"
>
> strtable = strtable & "<tr valign="top">" &
>            "<td width="51" bgcolor="#0488EC">CODICE</td>" &
>            "<td width="51" bgcolor="#0488EC">PRODOTTO</td>" &
>            "<td width="51" bgcolor="#0488EC">QTA MASSIMA</td>" &
>            "<td width="51" bgcolor="#0488EC">QTA RICHIESTA</td>" &
>            "</tr>"
>
> How can I put inside an ASP variable HTML code?
>
> Thanks in advance.
> Dax
>


Try this:

strtable = strtable & "<tr valign=""top"">" &_
    "<td width=""51"" bgcolor=""#0488EC"">CODICE</td>" &_
    "<td width=""51"" bgcolor=""#0488EC"">PRODOTTO</td>" &_
    "<td width=""51"" bgcolor=""#0488EC"">QTA MASSIMA</td>" &_
    "<td width=""51"" bgcolor=""#0488EC"">QTA RICHIESTA</td>" &_
         "</tr>"


d.
Author
20 Mar 2006 9:17 AM
Dax
Nothing to do
Author
20 Mar 2006 10:10 AM
dany
Dax schreef:
> Nothing to do
>
Then you have to redefine your question.

The error you get is due to embedding double quotes inside your string,
so I double-upped your quotes. You also forgot the &_ to concatenate
multiple lines of code.

d.

AddThis Social Bookmark Button