Adding a PayPal button within content detail of MasterPages

How do you add a  PayPal button inside of a content detail of a master page.  Since a MasterPage automatically encapsulates and nests ALL of the code of its contentplaceholder, by definition...all design and coding in a contentplaceholder cannot encorporate a form.  This is true because w3 specs do not allow the nesting for forms.

 

Simple MasterPage
'  No form can exist in the rest of this page...because you cannot nest forms within forms.  Since ASP.NET is about to require the detail page to be within an asp.net form, it does not straightforwardly support any sequential forms in the detail page that follows


<form id="form1" runat="server">
	<asp:ContentPlaceHolder runat="server" id="ContentPlaceHolder2">
	Header  ' NO FORMS can go in HERE
	</asp:ContentPlaceHolder>


<asp:ContentPlaceHolder runat="server" id="ContentPlaceHolder1">
Main Content ' NO FORMS can go in HERE
</asp:ContentPlaceHolder>
</form>


'I could put a sequential form here...but this is the end of the webpage and back in the Master Page....nothing really left to do.


 

hi,

Can you place the PayPal butto before the ContentPlaceHolder or form1. We can have multiple forms on the page as long as only one of them has the runat="server" attribute.

No..

The entire purpose of a master detail page is such that the Master page contains the basic "frames (content)" layout.  ALL of the primary web content is in a contentplaceholder.  I don't see that as atypical.  99.9999% of all master/detail pages are arranged in this fashion.   

And a PayPal button is the tip of the iceburg.  There are literally thousands of normal cross-post applications in any normal web application out there where a form must reside within a content place holder. 

Hi,

According to your description ,I would like to suggest you to check the link below for the article which describes about how to include multiple form tags in an ASP.NET page.

http://www.codeproject.com/Articles/36071/Implementing-Non-ASP-NET-Posts-in-ASP-NET.aspx

Hope it can help you.

Thanks, unfortunately rewriting the worlds software code just so it will work with Microsoft is "RARELY" an option.   The problem with this rewrite is now it will ONLY will asp.net...it won't stand-alone anymore and work on its own.

1 thoughts on "Adding a PayPal button within content detail of MasterPages"

Leave a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>