I have the following 1.aspx page
<%@ Page Language="VB" %>
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
</HEAD>
<BODY>
<%=stl%>
</BODY>
</HTML>
<%
public function stl() As String
return "Hello Word"
end function
%>
When I run this page, I get the following error:
Compiler Error Message: BC30289: This statement cannot appear within a method body. The compiler will assume an intent to terminate the method body.
Source Error:
Line 9: </HTML>
Line 10: <%
Line 11: public function stl() As String
Line 12: return "Hello Word"
Line 13: end function
Source File: C:\\WebServers\\Gazeta\\1.aspx Line: 11
Where am I wrong?
Thank you