Basically your site will have two parts to the payment process. The shopping cart, and the payment form. The payment form is integrated with a payment gateway (Authorize.net, Verisign, etc.) that is attached to your merchant account or other payment system. The transaction information must be securely transmitted to the gateway and the gateway returns an approved or declined response. Your would then display a declined or approved page depending on which response is needed.
If you are using authorize.net you can check out these scripts. I have used the php version but not the ASP. This company provides great support so I assume the ASP is just as good as the PHP.
http://www.authnetscripts.com/