Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

calling functions from if then blocks

I have 10 functions and they are being called within each other.Here is how it looks
---------------
sub a2()
if (Session("fernav") < 30) then
a3()
else
a5()
End If
End Sub

Sub a3()
if (Session("grassav") < 30) then
a4()
else
a5()
End If
End Sub
---------------

and this is how it goes..this page had no problem in ASP but with ASP.NET I have this problem:
"BC30081: 'If' must end with a matching 'End If'"
The problem disappears when I dont call the other functions from a function...in the above example it would be that if I dont call a3() and a5() from the function a2()
Does anybody know how i can solve this problem.
thanks
[770 byte] By [cengo] at [2007-11-11 6:50:02]