Do you want to create your own Gateway ? If yes, it would be difficult with ASP alone.
You may try use some existing payment gateways like Worldpay(www.worldpay.com
), EPDQ etc.
The integration details are available in their sites. I find the integration of Worldpay to be the easiest.