Nested Forms

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jamie

    #1

    Nested Forms

    Just thought i'd post this tip for developers who are having problems
    submitting HTML forms which reside inside a parent ASPX web form.

    basically, HTML forms wont submit correctly if they're inside an outer
    form. this is obviously a relevant issue with ASPX as webcontrols need
    to reside inside a server side form.

    i found a work around which will allow u to nest multiple forms.
    straight after your server side form add a "dummy" form tag. all
    proceeding forms will now submit correctly. for some reason, the first
    nested form wont submit at all, but the rest will. beats me why this
    is, but it works! e.g.

    <form id="Form1" runat="server">
    <form name="dummy" method="post" action=""></form>

    <form name="real_form " method="Post" action="results .aspx">
    ... controls etc ...
    </form>

    </form>

    by the way, i havent tested this in NS, only MSIE.

    jamie
Working...