Technology

Adding PayPal Buttons to ASP.Net Forms

               I have making some changes to the United States GIS Data Repository website (www.USGDR.org), including the addition of a PayPal “Donate” button (donate buttons work the same as other buttons, so this post is relevant to you non non-profits too).

                I spent a good amount of time looking through PayPal help, various blogs, and asking friends how to get the PayPal code to work on an asp.net page, but to no avail, finally I figured it out.  I also wanted a new window to pop-up when the button was clicked, rather than redirecting the user away from the site.

Here’s what I did:

<div style=”text-align: center; vertical-align: middle;”>

    <a href=”PAYPAL URL”>

<input type=”image” OnClick=”window.open(‘PAYPAL URL’)” value=”enter” src=”https://www.paypal.com/en_US/i/btn/btn_donateCC_LG.gif” name=”submit” alt=”PayPal – The safer, easier way to pay online!”>

</input></a>

</div>

So, to whoever finds this, you are welcome.  Comment if this helps you!

Leave a Reply

Your email address will not be published. Required fields are marked *