4) Generated QueryString
Well, if you don't like panels and don't like Session Variables then your running out of options - fast. But there is one last way that you may want to try - the good old Querystring.
<script language="VB" runat="server"> Sub Do_page1(sender as object, e as EventArgs) Response.Redirect("mpf6.aspx?name=" & name.Text) End Sub </script> <form runat="server"> Enter your name: <asp:textbox id="name" runat="server" /><br> <asp:button text="Next Page" runat="server" OnClick="Do_page1" /> </form> |
Page 1 -Live Demo |
<script language="VB" runat="server"> Sub Do_page2(sender as object, e as EventArgs) Response.Redirect("mpf7.aspx?name=" & Request.QueryString("name") & "&city=" & city.Text) End Sub </script> <form runat="server"> What city do you live in <%=Request.QueryString("name")%>? <asp:textbox id="city" runat="server" /><br> <asp:button text="Next Page" runat="server" OnClick="Do_page2" /><p> </form> |
Page 1 -Live Demo |
Thanks <%=Request.QueryString("name")%>, I hope it's nice in <%=Request.QueryString("city")%>. |
Page 1 -Live Demo |
This is not really an option if you have a large form because you'll have to build a huge querystring from scratch. Also, updating this kind of form is very hard (mainly with editing the Querystring).