Home > Archive > ASP > August 2005 > runat=server!
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
|
| The following code snippet
----------------------------------------
<script language="VBScript" runat=server>
<%
a=1
%>
</script>
<%= a %>
----------------------------------------
throws the "Expected statement" error pointing to line no. 2. Why?
Thanks,
Arpan
| |
| Bob Lehmann 2005-08-25, 7:56 am |
| Remove the script delimiters from the <script> block.
<script language="VBScript" runat=server>
a=1
</script>
Bob Lehmann
"Arpan" <arpan_de@hotmail.com> wrote in message
news:1124972668.206805.86190@g49g2000cwa.googlegroups.com...
> The following code snippet
>
> ----------------------------------------
> <script language="VBScript" runat=server>
> <%
> a=1
> %>
> </script>
> <%= a %>
> ----------------------------------------
>
> throws the "Expected statement" error pointing to line no. 2. Why?
>
> Thanks,
>
> Arpan
>
| |
| Aaron Bertrand [SQL Server MVP] 2005-08-25, 6:55 pm |
| Because you have doubled the delimiters. Use <script></script> or <% %> ...
there is no point in doing both.
"Arpan" <arpan_de@hotmail.com> wrote in message
news:1124972668.206805.86190@g49g2000cwa.googlegroups.com...
> The following code snippet
>
> ----------------------------------------
> <script language="VBScript" runat=server>
> <%
> a=1
> %>
> </script>
> <%= a %>
> ----------------------------------------
>
> throws the "Expected statement" error pointing to line no. 2. Why?
>
> Thanks,
>
> Arpan
>
|
|
|
|
|