ASP NET 2.0 Wizard Control - creating dynamic steps

G

Guest

I have a wizard control on a page with the first two setps are static,
created in the VS2005 UI; the remaining steps are created dynammically. For
some reason I cant get it to retain in the viewstate.

In the Page_Init I create the wizard steps. There will be 17 steps in all.

protected void Page_Init(object sender, EventArgs e)
{
if (!IsPostBack)
{
MemberAssessment assessment = getAssessment(assessmentID);

foreach (AssessmentSection section in assessment.Sections)
{
WizardStep step = new WizardStep();
step.Title = section.Name;
step.ID = "wizStep" + section.ID.ToString();
Wizard2.WizardSteps.Add(step);
LoadStep(section, step);
}
}
}

If I click 'Next' all of the dynamically created steps dissapear, so I
remove the IsPostBack and I cant save my values, beacuse the step is
recreated before the nextButtonClick event. My question is, in which page
event do I build the steps so that it will retain in the viewstate and not
have to be rebuilt?


Thanks,

--bill
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,577
Members
45,054
Latest member
LucyCarper

Latest Threads

Top