Multi-Page Forms
page 5 of 6
by . .
Feedback
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 30119/ 48

Method 4 - Querystrings

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).


View Entire Article

User Comments

No comments posted yet.

Product Spotlight
Product Spotlight 





Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2024 ASPAlliance.com  |  Page Processed at 2024-03-28 9:43:45 AM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search