Override asp.net form tag
I have a master page containing the following asp.net form tag
<form id="CommerceMasterForm" runat="server">
in one page of my site i need to create a normal html form from a custom control
<FORM action="http://externaldomain.com" method="post">
How can I override asp.net form tag and make it like normal html form.
source to share
You must include the closed form tag before the new form tag. Multiple form tags are allowed in HTML, but they cannot be nested. I use this PayPal trick on some MasterPages and it works fine.
</FORM>
<FORM action="http://externaldomain.com" method="post">
This will prevent postback of any server controls from that point.
source to share
You can use Cross Page Walkthrough to submit an existing form to another page:
<asp:Button runat="server" id="Submit" PostBackUrl="TargetPage.aspx" />
From MSDN :
In some cases, you can send one page to another page .... In this case, you can customize certain controls on the page to publish to a different landing page. This is called cross-placement.
Because off-page wiring is set up for individual controls, you can create a page that is sent to different pages depending on which button the user clicks on.
source to share