If you need to define global variables, you will have to put them in
<script> blocks as well. Think of it like this, anything within those
<script> blocks gets put into an auto-generated class file while anything in
the <% %> blocks gets put inside a render method of that class. So if you
want to have access to variables outside of just the render method they need
to be declared in <script> blocks.
--
Hope this helps,
Bryant Hankins
Numinet Systems Inc.
http://www.numinet.com
"Marcel Balcarek" <ma*************@REM-OVEMEtoxicall.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Thanks Bryant,
That helped a lot.
I notice that the Function no longer has access to any global variables
defined in INCLUDES
such as the ado predefined variables and my own globals - do I simply have
to pass them in as variables, or is there another way?
Thanks again. Marcel
"Bryant Hankins" <bryanthankins@_NO_SPAM_hotmail.com> wrote in message
news:OP**************@TK2MSFTNGP11.phx.gbl... ASP.NET will not allow you to declare functions between <% %> tags. This
is because any code between those tags gets added to the body of a render
method at runtime. You have to wrap function defs in <script> tags like
so:
<script language="VB" runat="Server">
Function ChangePassword()
..
End Function
</script>
--
Hope this helps,
Bryant Hankins
Numinet Systems Inc.
http://www.numinet.com
"Marcel Balcarek" <ma*************@REM-OVEMEtoxicall.com> wrote in
message news:Or**************@TK2MSFTNGP10.phx.gbl... I am converting an ASP page to ASP .NET (not a rewrite).
I have renamed my ASP page to ASPX, but have one remaining issue.
My ASP has some functions after the mainline code, but when I run the
code I get the following on the function definition line:
BC30289: Statement cannot appear within a method body. End of method
assumed.
<%
mainline ASP code
.
.
.
Function ChangePassword()
..
End Function
%>
How can I resolve this? Thanks
Marcel