Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > runat=server!

Reply
Thread Tools

runat=server!

 
 
Arpan
Guest
Posts: n/a
 
      08-25-2005
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

 
Reply With Quote
 
 
 
 
Bob Lehmann
Guest
Posts: n/a
 
      08-25-2005
Remove the script delimiters from the <script> block.

<script language="VBScript" runat=server>
a=1
</script>

Bob Lehmann


"Arpan" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) ups.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
>



 
Reply With Quote
 
 
 
 
Aaron Bertrand [SQL Server MVP]
Guest
Posts: n/a
 
      08-25-2005
Because you have doubled the delimiters. Use <script></script> or <% %> ...
there is no point in doing both.




"Arpan" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) ups.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
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off




Advertisments