Wizard control eliminates the need to design forms to execute a step-by-step process in the actual business flow. This simplifies the work of developers to design and write the code.
The control provides a mechanism that allows you to easily build the desired wizard as a collection of steps, add a new step, or reorder the steps. You don't have to write any infrastructure whatsoever for navigation or to persist user data between steps.
The asp, wizard is a control name and wizard steps is the parent element for the asp:wizardstep element.
<asp:wizard id="wizard1" runat="server">
<wizardsteps>
<asp:WizardStep runat="server" Title="Personal Information" StepType="Auto">
<!-- Place the control here. -->
</asp:WizardStep>
</wizardsteps>
</asp:wizard>
There can be multiple wizard step that iterates from by form. The control can be placed in the wizard step tag.
The step is the enum type which has the attributes Auto, Complete, Finish, Start, and Step.
The first form will have the next button and all the subsequent forms will have the previous and next button.
The last wizard step tag should be defined as the complete step type.
There are events that are used to write the events on the controls in the wizard control.
- OnActiveStepChanged
- OnCancelButtonClick
- OnPreviousButtonClick
- OnNextButtonClick
- OnFinishButtonClick
- OnSideBarButtonClick
For example, the Finish button click event can be written on the server side like the following.
protected void OnFinish(object sender, WizardNavigationEventArgs e)
{
WizardStepType t = Wizard1.WizardSteps[e.NextStepIndex].StepType;
if (t == WizardStepType.Finish)
{
// code here...
}
}
Wizard control properties
| Template | Description |
| FinishNavigationTemplate | Specifies the navigation bar shown before the last page of the wizard; by default, the navigation bar contains the Previous and Finish buttons |
| HeaderTemplate | Specifies the title bar of the wizard |
| SideBarTemplate | Used to display content on the left side of the wizard control |
| StartNavigationTemplate | Specifies the navigation bar for the first view in the wizard; by default, it contains only the Next button |
| StepNavigationTemplate | Specifies the navigation bar for steps other than first, finish, or complete; by default, contains Previous and Next buttons |




Piyush UpadhyayPosted May 12, 2022, 6:36 AM
I have one problem I am not able to read control values of Wizard step 1 from wizard step 2 by javascript , I tried with document.getElementById("xtPrice").value but not able to read because the control exist in wizard step 1 and I am reading in wizard step 2. Is there any way ?
bishan dassPosted Jun 9, 2015, 5:26 AM
Thanx dear
Sharma RamashankarPosted Dec 21, 2013, 2:43 AM
Nice Frnd ! Best support done by you ...
Hareesh MGPosted Sep 9, 2013, 1:29 PM
Thanks Senthil..good information
Yogesh ChavanPosted Apr 23, 2013, 2:25 AM
You have shared a very useful information..Thanks
SenthilkumarPosted Mar 15, 2012, 4:07 AM
Welcome Mr. arjun and Akash :-)
Akash AhlawatPosted Mar 15, 2012, 1:10 AM
You have shared a very useful information..Thanks
Arjun PanwarPosted Mar 14, 2012, 11:53 PM
Thanks Mr.senthil for sharing this article.