Syntax for including and calling a Function within an ASP.net or ASPX page
<p>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).</p>

<p>I really have looked for examples but can't find any.</p>

<p>I'd have thought it was as simple as:</p>

<p>&lt;%
Function myFunction as string
  MyFunction="blah"
End Function
%>  </p>

<p>'main code here</p>

<p>But.... I get a vague syntax error (below)  which I can't find any help one:</p>

<p><em>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:</em></p>
