ASP Sub Procedures and Functions
ASP Sub Procedure
Sub procedure is collection of ASP statements that performs a task and executes when it's called on event procedure. Event procedure is any clickable objects or on load event. Sub procedure does not return value but executes its content on call.
ASP Function Procedure
Result: <% call exproc(3,4) %> or Result: <% exproc 3,4 %>
Function procedure is a series of ASP statements enclosed by the Function and End Function statements. A Function procedure is similar to a Sub procedure, but can also return a value. A Function procedure can take arguments (constants, variables, or expressions that are passed to it by a calling procedure).
Response.Write("Total price is: " & total(50))