Sample Code: Quick Intro to <asp:wizard> control in Whidbey

The <asp:wizard> control enables us to divide a large form into multiple sub forms.
This is otherwise traditionally done with ASP.NET v1.1 controls using <asp:panel> or <asp:placeholder> on one/multiple pages.

Handling Next/Previous/Finish can be done by setting the properties of the control

Some tags associated with the <asp:wizard> are 

<wizardsteps>
<asp:wizardsteps>
<stepnavigationtemplate>
 

Here is just a sample of how to use the <asp:wizard> control

<asp:wizard id="Wizard1" runat="server" onfinishbuttonclick="FinishbtnClick"

nextstepbuttontext="Next" finishstepbuttontext="Finish"

previousstepbuttontext="Previous" sidebarenabled="false"> <wizardsteps> <asp:wizardstep runat="server" steptype="start" title="Name/Password" id="Start"> Name: <asp:textbox id="txtName" runat="Server"></asp:textbox> <asp:requiredfieldvalidator runat="server" controltovalidate="txtName"

id="RequiredFieldValidator1" errormessage="*">

</asp:requiredfieldvalidator> <br /> Email:<asp:textbox id="txtEmail" runat="server"></asp:textbox> <asp:regularexpressionvalidator id="Regularexpressionvalidator1" runat="server"

errormessage="Invalid Email" controltovalidate="txtEmail"

validationexpression="\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"> </asp:regularexpressionvalidator> </asp:wizardstep> <asp:wizardstep id="step" steptype="step" runat="server" title="Address/City"> Address:<asp:textbox id="txtAddress" textmode="multiline" runat="server">

</asp:textbox> <br /> City:<asp:textbox id="txtCity" runat="server"></asp:textbox> </asp:wizardstep> <asp:wizardstep id="Finish" steptype="finish" runat="server" title="Finish"> Description:<asp:textbox id="txtDescription" runat="server">

</asp:textbox> <br /> Comments:<asp:textbox id="txtComments" runat="server" textmode="multiLine">

</asp:textbox> </asp:wizardstep> <asp:wizardstep id="Complete" steptype="complete" runat="server" title="Data Entered"> <asp:bulletedlist id="Bulletedlist1" runat="server"> </asp:bulletedlist> </asp:wizardstep> </wizardsteps> </asp:wizard>

 

 

<script runat="server" language="vb"> Sub FinishbtnClick(ByVal sender As Object, _

ByVal e As System.Web.UI.WebControls.WizardNavigationEventArgs) Bulletedlist1.Items.Add("Name : " & txtName.Text) Bulletedlist1.Items.Add("Email : " & txtEmail.Text) Bulletedlist1.Items.Add("Address : " & txtAddress.Text) Bulletedlist1.Items.Add("City : " & txtCity.Text) Bulletedlist1.Items.Add("Description : " & txtDescription.Text) Bulletedlist1.Items.Add("Comments : " & txtComments.Text) End Sub </script>

 

<asp:wizard> Attribute/Settings

Description

nextstepbuttontext,previoustepbuttontext, finishstepbuttontext

Text for the Next/Previous/Finish button

sidebarenabled

Boolean value set to true/false to display/hide the title set for sidebar

 

<asp:wizardstep> Attribute/Settings

Description

Steptype

In the order of appearance:Start,Step,Finish,Complete

title

If the sidebarenabled is true then the text given in title appears in sidebar.

Published Wednesday, March 31, 2004 1:41 PM by SushilaSB
Filed under:

Comments

Monday, April 05, 2004 2:29 AM by TrackBack

# Trackback

Trackback
Thursday, April 08, 2004 3:09 AM by TrackBack

# Trackback

Trackback
Monday, October 20, 2008 2:10 AM by Zahra

# re: Sample Code: Quick Intro to <asp:wizard> control in Whidbey

very good Sushila.

that was great.

any mail address?

if yes please send me your address through:

farrokhi.z@gmail.com

Monday, February 09, 2009 5:42 AM by Srini

# re: Sample Code: Quick Intro to <asp:wizard> control in Whidbey

I have some doubts. How to make dynamically visible true or false of wizards.

Monday, February 09, 2009 6:06 AM by Srini

# re: Sample Code: Quick Intro to <asp:wizard> control in Whidbey

I have some doubts. How to make dynamically visible true or false of wizards.

Thursday, October 22, 2009 12:36 PM by Wolf81

# re: Sample Code: Quick Intro to <asp:wizard> control in Whidbey

A little later, students are assessed by videotaped unseen client scenario,   with the role of the client played by another student or actor. ,

Friday, October 23, 2009 9:42 AM by No_limits18

# re: Sample Code: Quick Intro to <asp:wizard> control in Whidbey

Community schools strengthen schools, fami- lies, and communities so that together they are better able to improve student learning. ,

Leave a Comment

(required) 
(required) 
(optional)
(required)