You can write functions in ASP similar to the way you write them in Visual Basic. It is good programming practice to use functions to modularize your code and to better provide reuse.
This article explains benefits of using functions and subprocedures, shows difference between them, and gives code for function that prints out info or takes an integer value and returns the square of that value. More...