the syntax should be something like this:

<% function("var") %>

...but this does not work. The function is called and no errors are produced. The function return value simply does not print. Please help, I know this is a very simple explanation.

OK, found the solution, so here goes...

<% =function("var") %>

where var = some string variable value and the function lies in the code behind page. The function must be of type public, and in this example the function returns a string. Calling class functions does not work directly from the .aspx page code.

Hope this helps someone else.