Multiple server forms can be employed as long as only one is rendered at a time : Form « HTML Controls « ASP.NET Tutorial






<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" 
    Inherits="Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Multiple Server Forms--Kind of Wizard</title>
</head>

<body>
   
    <div id="pageContent">
        <form id="step0" runat="server" visible="true">
            <h1>Welcome</h1>
            <asp:textbox runat="server" id="Textbox1" />
            <asp:button ID="Button1" runat="server" text="Step #1" OnClick="Button1_Click" />
        </form>

        <form id="step1" runat="server" visible="false">
            <h1>Step #1</h1>
            <asp:textbox runat="server" id="Textbox2" />
            <asp:button ID="Button2" runat="server" text="Previous step" OnClick="Button2_Click" />
            <asp:button ID="Button3" runat="server" text="Step #2" OnClick="Button3_Click" />
        </form>

        <form id="step2" runat="server" visible="false">
            <h1>Finalizing</h1>
            <asp:button ID="Button4" runat="server" text="Finish" OnClick="Button4_Click" />
        </form>
    </div>
</body>
</html>


File: Default.aspx.cs

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;


public partial class Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
    Title = "Welcome";
    }
  protected void Button1_Click(object sender, EventArgs e)
  {
    Title = "Step 1";
    step0.Visible = false;
    step1.Visible = true;
  }
  protected void Button2_Click(object sender, EventArgs e)
  {
    step0.Visible = true;
    step1.Visible = false;
  }
  protected void Button3_Click(object sender, EventArgs e)
  {
    Title = "Finalizing";
    step1.Visible = false;
    step2.Visible = true;
  }
  protected void Button4_Click(object sender, EventArgs e)
  {
    Title = "Done";
    step2.Visible = false;
    Response.Write("<h1>Successfully done.</h1>");
  }
}








4.5.Form
4.5.1.form default focus
4.5.2.Use HTML form to layout asp.net controls (VB.net)
4.5.3.Submitting Form Data
4.5.4.Specifying a Default Button
4.5.5.A survey form (C#)
4.5.6.Using validation controls to fill a form.
4.5.7.one server-side form tag and multiple client HTML form elements
4.5.8.Multiple server forms can be employed as long as only one is rendered at a time