BC30289: Statement cannot appear within a method body. End of method assumed.

C

Carlos Oliveira

For ASP.NET beginners (like me):

I'm trying to migrate "easily" my ASP pages to ASPX pages.

Of course, I found the error below:

BC30289: Statement cannot appear within a method body. End of method
assumed.

This erros occurs becaus my Subs and Functions are between tags <% and
%>. For example:

<%
function Calc(x,y)
Calc = y * x
end function
%>

The simple way to pass this problem was:

Move the code of Subs and Functions between tags below:

<script runat="server" language="vb">
function Calc(x,y)
Calc = y * x
end function
</script>

Regards.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top