Amazon.com Widgets

Adding a PayPal Donate Button with HTML in ASP.Net

How do I add a PayPal donate button to my ASP.Net website with what PayPal generates for me?  After looking through Google I came up with my own easy solution.  It only involves HTML too!  Here it is and then I’ll explain it.

<a id="paypalDonate" href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=4381882"><img border="0" id="payPalImage" src="https://www.paypal.com/en_US/i/btn/btn_donateCC_LG.gif" alt="Donate to ASINLookUp.com" /></a>

First of all, create a anchor tag.  In the herf property of the anchor tag past the code from the “E-MAIL” tab where you generated the button from PayPal.  Next inside the anchor tag place a image tag.  Set its border to 0.  This gets ride of the outline around it.  Then in the source property add the GIF used to display the button from the “WEBSITE” tab where you generated the button from PayPal.

Last, set the style of “Text-Decoration: none” on your anchor link.  I did mine in a CSS but you can do yours in the tag if you want.  This gets rid of the underline you see with a link.

I hope this helped as there were may confusing ways to do it out there and some rather complicated, I thought.  See my PayPal Donate button in action by going to: AsinLookUp.com

3 Responses to “Adding a PayPal Donate Button with HTML in ASP.Net”

  1. Thanks A LOT

    NICE JOB MAN

  2. This worked for me. Thanks for posting it!

  3. Unfortunately this doesn’t work with buttons that have the encrypted parameter.
    I found this solution that uses POST to send the info:
    http://www.bwave.ca/2011/07/26/adding-paypal-donate-button-to-asp-net-page-the-easy-way/