Chapter 5. Working with the Page
Although formless pages are still accepted and correctly handled, the typical ASP.NET page contains a single <form> tag decorated with the runat attribute set to server. On the server, the <form> tag is mapped to an instance of the HtmlForm class. The HtmlForm class acts as the outermost container of all server controls and wraps them in an HTML <form> element when the page is rendered. The obtained HTML form posts to the same page URL and for this reason is said to be reentrant. The default method used to submit form data is POST, but GET can be used as well.
In most cases, the server form is the outermost tag of the page and is contained directly in <body>. In general, though, the server <form> tag can be the ...
Get Programming Microsoft® ASP.NET 3.5 now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.