How To: Use a ListView to Make People Read a Statement Before Filling Out Your Form
I use a ListView to display a form based off of a data model that people fill out. I know that ListViews are meant for lists but I like that you can databind it to a source so you don't have to do any code behind. In my case, I just need values from a custom control within the ListView.
That said, I will assume you're in a similar scenario. I needed to display a privacy notice before someone fills out a form and I knew I could just create two panels and show/hide them, etc. or two pages. However, I usually like exploring different ways of doing things.
All you have to do is make use of some clever manipulation of the Templates:
<asp:listview id="MyListView" runat="server" DataSourceID="SomeDataSource" DataKeyNames="Id">
<LayoutTemplate>
<asp:placeholder id="itemPlaceholder" runat="server" />
</LayoutTemplate>
<ItemTemplate>
<h1>Privacy Notice</h1>
<p>Some Text</p>
<%-- Notice the Select command --%>
<asp:button id="btnContinue" commandname="Select" text="Continue" runat="server" />
</ItemTemplate>
<SelectedItemTemplate>
<h1><%#Eval("DataBoundColumn")%></h1>
<%-- Handle the ListView_Inserting event --%>
<p>
<asp:button id="btnSubmit" commandname="Insert" text="Submit" runat="server" />
</p>
</SelectedItemTemplate>
<EmptyDataTemplate>
<p>No Data</p>
</EmptyDataTemplate>
</asp:listview>
In effect, all I am doing is selecting an item... just the regular ItemTemplate is my notice and the SelectedItemTemplate is my actual item.
You could also use this method to show two different types of forms (but in that case, two pages seems like a better idea).