A master page must have a form tag with a runat=”server” attribute.
A PayPal donation button must be inside a form that posts to “https://www.paypal.com/cgi-bin/webscr”
You can’t put that as an action on the master page’s form tag because (a) it’s ignored, and (b) if it weren’t ignored you hardly want to state that all of your pages should be posted to paypal.com.
One solution is to post the master-page-derived form to a hidden page. The hidden page does not have a master page. It submits to PayPal.
Donation Page
‹form action=”submit-paypal.aspx” method=”get”›
‹input type=”image”
src=”images/x-click-butcc-donate.gif” mce_src=”images/x-click-butcc-donate.gif”
style=”border:none” name=”submit”
alt=”Make your Thera-Puppy donation with PayPal - it’s fast, free and secure!”›
‹/form›
submit-paypal.aspx
The body tag loads the form. The user never sees this page. They are taken to form’s action location: https://www.paypal.com/cgi-bin/webscr
‹%@ Page Language=”C#” AutoEventWireup=”true” CodeFile=”submit-paypal.aspx.cs” Inherits=”submit_paypal” %›
‹!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”›
‹html xmlns=”http://www.w3.org/1999/xhtml” ›
‹head runat=”server”›
‹title›Untitled Page‹/title›
‹/head›
‹body onLoad=”SubmitForm.submit()”›
‹form name=”SubmitForm” action=”https://www.paypal.com/cgi-bin/webscr” method=”post”›
‹input type=”hidden” name=”image_url”
value=”http://bogartcomputing.com/therapuppy/images/juggopop.jpg”›
‹input type=”hidden” name=”cmd” value=”_s-xclick”›
‹input type=”hidden” name=”encrypted”
value=”—–BEGIN PKCS7—– [a very long encrypted string from paypal here]==—–END PKCS7—–
“›
‹/form›
‹/body›
‹/html›


{ 0 comments… add one now }
You must log in to post a comment.