E:\web\learnaspcom\htdocs\freebook\learn\ubtoc.xml LearnAsp.com - ASP ASP.net Free Lessons
Search Search

#1 worldwide
FREE Coding Lessons

since 1996
   THE BEST WAY to learn ASP & Asp.net!
Advertise Here!
click for details
Credits Host:
DiscountASP.net
Server Admin:
The "Team"
Contact Info.
Charles M. Carroll
<Asp.net blog>
<personal site>
xxx

Panels Sample by Charles Carroll

Here is a simple multi-page form adapted to 1 page with a wizard

   filename=/experiments/panels/survey.aspx

<Test Script Below>


<script language="vb" runat="server">
sub page_load(s as object,e as eventargs)
    page1.visible=true
    page2.visible=false
    page3.visible=false
    page4.visible=false
end sub


sub start_click(s as object,e as eventargs)
    trace.write("Start_click","happened")
    page1.visible=false
    page2.visible=true
    page3.visible=false
    page4.visible=false
end sub

sub page2done_click(s as object,e as eventargs)
    trace.write("page2done_click","happened")
    page1.visible=false
    page2.visible=false
    page3.visible=true
    page4.visible=false
end sub

sub page3done_click(s as object,e as eventargs)
    trace.write("page3done_click","happened")
    page1.visible=false
    page2.visible=false
    page3.visible=false
    page4.visible=true
end sub
</script>
<html><head>
<TITLE>Survey</TITLE>
</head>
<body bgcolor="#FFFFFF">
<form runat="server">

<ASP:Panel id="page1" runat="server">
    First Name<br>
    &nbsp;&nbsp;&nbsp;
    <input type="text" id="fname" size="20" runat="server" /><br>
    Last Name<br>
    &nbsp;&nbsp;&nbsp;
    <input type="text" id="lname" size="20"  runat="server" />
    <p>&nbsp;&nbsp;&nbsp;
    <input type="submit" value="Next Question ->" OnServerClick="Start_click" runat="server" /></p>
</ASP:panel>

<ASP:Panel id="page2" runat="server">
    Hair Color<br>
    &nbsp;&nbsp;&nbsp;
    <input type="text" id="haircolor" size="20" runat="server" /><br>
    Favorite Color<br>
    &nbsp;&nbsp;&nbsp;
    <input type="text" id="favoritecolor" size="20"  runat="server" />
    <input type="submit" value="Next Question ->" OnServerClick="Page2done_click" runat="server" /></p>
</ASP:panel>

<ASP:Panel id="page3" runat="server">
    Street Address<br>
    &nbsp;&nbsp;&nbsp;
    <input type="text" id="street" size="20"  runat="server" />
    <br>
    City<br>
    &nbsp;&nbsp;&nbsp;
    <input type="text" id="city" size="20"  runat="server" /><br>
    State<br>
    &nbsp;&nbsp;&nbsp;
    <input type="text" id="state" size="20"  runat="server" />
    <br>
    Zip<br>
    &nbsp;&nbsp;&nbsp;
    <input type="text" id="zip" size="20" runat="server" />
    <br>
    <input type="submit" value="Final Step ->" OnServerClick="Page3done_click" runat="server" />
</ASP:panel>


<ASP:Panel id="page4" runat="server">
    Thanks for all your information<br>
    We  are happy to meet you <%=fname.value%>&nbsp;<%=lname.value%><br>
    We  know your hair color is <%=haircolor.value%><br>
    and your favorite color is <%=favoritecolor.value%><br>
    and we will ship all items to<br>
    <%=fname.value%>&nbsp;<%=lname.value%><br>
    <%=street.value%><br>
    <%=city.value%>&nbsp;<%=state.value%>&nbsp;<%=zip.value%>
</asp:panel>
</form>
</body></html>
There are many worthy charities!!. But perhaps help starving children in Africa or South America AND help Charles too. a $5 tip buys him lunch at McDonalds, a $20 tip buys his kid Hitoshi a new computer game, a $39 tip buys his daughter Michiko a few nice outfits. See our donor list.