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
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