Hi
This almost certainly has to be php, not asp. There's a simple amortisation calculator shown at
Free PHP Mortgage Calculator - LoansandDebts.com and there are plenty of others around.
See also
Mortgage amortization calculator Free Download
The principal is the same for leasing, although the algorithm may differ. You set the parameters.
Barry