I had a similar problem that took a few days to figure out. I was porting an application from ColdFusion to .NET 3.5 and the page seemed to post back, but most of the request was lost.
The problem was with having a form element which wasn't marked with a runat="server"
tag being nested within the form tag marked with a runat="server"
.
My resolution was simple: I removed the html-based form element and relied on the main form. Your issue sounds slightly different because you're dynamically building the form. From my research during that time, I learned that form elements shouldn't be nested and that only one per page can be server-side.
MSDN Magazine has an article with several options for displaying multiple forms on a single page:
http://msdn.microsoft.com/en-us/magazine/cc164151.aspx#S4
However, if your generated forms are fairly simple as you've posted, you may consider generating the controls and using an asp:Button
control's PostbackUrl
property to set the page to which a postback should be submitted.
An example, taken from MSDN:
<form id="form1" runat="server">
<h3>Button.PostBackUrl Example</h3>
Enter a value to post:
<asp:textbox id="TextBox1"
runat="Server">
</asp:textbox>
<br /><br />
<asp:button id="Button1"
text="Post back to this page"
runat="Server">
</asp:button>
<br /><br />
<asp:button id="Button2"
text="Post value to another page"
postbackurl="Button.PostBackUrlPage2cs.aspx"
runat="Server">
</asp:button>
</form>
Notice how clicking the first button posts back to the current page, and clicking the second button posts back to Button.PostBackUrlPage2cs.aspx
and contains the value entered in the textbox in the Request object.