| << F.11.3- Sample TextArea Parsing | AppendixF | F.12.1- Sample Page with Multiple Forms >> |
Multiple Forms on One Page
HTML allows the use of multiple forms on one page. Manytimes we want to direct the user to one of several pages depending on theirdata. We know how to handle that on the response page by using Server.Execute (or the older Response.Redirect),but that requires a round trip to the server, which is slow. However, a formcan only have one ACTION, so we can't havemultiple sections of a form, each with their own ACTION.
Instead we have multiple forms on one page, each with an ACTION to its appropriate response page. The benefit isthat when the user clicks a submit, the appropriate page is called directly,rather than going to an intermediate page which .Executesor .Redirects to the appropriate page.
Many students get hung up on identifying which form wasused, because even though you can use a NAMEattribute in each FORM tag, that name is notpassed to the server in a useful way (try it with the RequestSniffer). But thisis not an issue: each form would have its own ACTIONresponse page, so the fact that a given page is called defines which form'ssubmit button the user clicked.
| << F.11.3- Sample TextArea Parsing | AppendixF | F.12.1- Sample Page with Multiple Forms >> |

RSS

