Unfortunately, according to W3C, you cannot have nested form tags in HTML. It is bad format and will either result in error when submitting the form, or your form will submit to the top level form object.
The way I was able to get around this was by creating a BUTTON as a button, rather than a submit button. This way, you can add an ONCLICK event to this new button and execute some javascript code.
I've included some code below:
1:
2:
3:
4:
5:
6:
7:
8:
9:
|
<asp:Button UseSubmitBehavior="false" OnClientClick="DoPaypoint();" ID="PaypointSubmit" runat="server" Text="Submit" />
<script language="javascript">
function DoPaypoint()
{
document.forms[0].action = "...paypointurl...";
document.forms[0].submit();
}
</script>
|