tags:

views:

61

answers:

2
<form runat="server" id="outer" >

  <form name="inner1" method="POST" action="http://www.somesite.com/page.php" >
    <input type="text" size="7" name="o" id="origin" value="london" ></input>
    <input type="submit" name="getDirectionsBtn" id="btnSubmit" value="Submit" />
    <input type="hidden" name="oo" value="p" />
  </form>

  <form name="inner2" method="POST" action="http://www.somesite.com/page.php" >
    <input type="text" size="7" name="o" id="origin" value="london" ></input>
    <input type="submit" name="getDirectionsBtn" id="btnSubmit" value="Submit" />
    <input type="hidden" name="oo" value="p" />
  </form>

  <form name="inner3" method="POST" action="http://www.somesite.com/page.php" >
    <input type="text" size="7" name="o" id="origin" value="london" ></input>
    <input type="submit" name="getDirectionsBtn" id="btnSubmit" value="Submit" />
    <input type="hidden" name="oo" value="p" />
  </form>
</form>

Second+ inner form work just fine but first one does nothing. No broken tags as far as I can see.

I require nested forms as they are POST to an external site and open in a blank window.

A: 

Yep, the first question has to be why are you nesting your forms? This is probably what is confusing ASP.Net more than anything. If you remove the outer form does it work?

CResults
+3  A: 

The HTML specification does not allow nested forms.

You might well find that the opening tag of the first inner form is being ignored (depending on browser and standards mode), then your main <form> is being closed by the first inner forms closing tag, and then the subsequent forms are working "as expected".

Zhaph - Ben Duguid