Please follow below any item:
1. Write a function in code behind with public/protected modifier and then call as below:
<%= YourCodeBehindFunctionName() %>
2. If you want to call a function from your business layer then call the function as, the function must be static:
<%= NamespaceName.ClassName.YourFunctionName() %>