ASP NET 2.0 Wizard Control - creating dynamic steps

Discussion in 'ASP .Net' started by =?Utf-8?B?QmlsbCBHYXV2ZXk=?=, Oct 17, 2005.

  1. 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
     
    =?Utf-8?B?QmlsbCBHYXV2ZXk=?=, Oct 17, 2005
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. chetan mistry

    Wizard control and dynamic steps

    chetan mistry, May 15, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    2,090
    chetan mistry
    May 15, 2006
  2. Replies:
    0
    Views:
    643
  3. Nick Gilbert
    Replies:
    5
    Views:
    929
  4. Andy B
    Replies:
    0
    Views:
    466
    Andy B
    Apr 19, 2008
  5. Chad A. Beckner

    Wizard Control +Add Dynamic Steps +Viewstate Crashing page

    Chad A. Beckner, May 26, 2006, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    457
    Chad A. Beckner
    May 26, 2006
Loading...

Share This Page