/// <devdoc> /// Creates the default steps if they were not specified declaritively /// </devdoc> private void EnsureCreateUserSteps() { bool foundCreate = false; bool foundComplete = false; foreach (WizardStepBase step in WizardSteps) { var createUserStep = step as CreateUserWizardStep; if (createUserStep != null) { if (foundCreate) { throw new HttpException(SR.GetString(SR.CreateUserWizard_DuplicateCreateUserWizardStep)); } foundCreate = true; _createUserStep = createUserStep; } else { var completeStep = step as CompleteWizardStep; if (completeStep != null) { if (foundComplete) { throw new HttpException(SR.GetString(SR.CreateUserWizard_DuplicateCompleteWizardStep)); } foundComplete = true; _completeStep = completeStep; } } } if (!foundCreate) { // This default step cannot disable ViewState, otherwise AllowReturn will not work properly. // VSWhidbey 459041 _createUserStep = new CreateUserWizardStep(); // Internally created control needs to be themed as well. VSWhidbey 377952 _createUserStep.ApplyStyleSheetSkin(Page); WizardSteps.AddAt(0, _createUserStep); _createUserStep.Active = true; } if (!foundComplete) { // This default step cannot disable ViewState, otherwise AllowReturn will not work properly. // VSWhidbey 459041 _completeStep = new CompleteWizardStep(); // Internally created control needs to be themed as well. VSWhidbey 377952 _completeStep.ApplyStyleSheetSkin(Page); WizardSteps.Add(_completeStep); } if (ActiveStepIndex == -1) ActiveStepIndex = 0; }