OK this is really silly but I don’t do ASP much and I can’t remember how to include a function or Sub within a page (to get some Code Reuse).
I really have looked for examples but can’t find any.
I’d have thought it was as simple as:
<%
Function myFunction as string
MyFunction=”blah”
End Function
%>
‘main code here
But…. I get a vague syntax error (below) which I can’t find any help one:
Server Error in ‘/’ Application.
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: BC30035: Syntax error.
Source Error:
VB.net example
here’s another example: http://www.808.dk/?code-aspnet-inline