I’m trying to create a dynamic survey form based on dynamic data by using ASP.NET Wizard.
I can create dynamic steps and dynamic inputs without any problem. However, the last step, when I submit the form, I won’t be able to collect all information from each steps.
Any idea?
Wizard wizard1 = new Wizard();
wizard1.Style.Add("width", "100%");
//wizard1.DisplaySideBar = false;
for (int i = 1; i <= 3; i++)
{
WizardStep step1 = new WizardStep();
step1.ID = "step" + i.ToString();
step1.Title = "step" + i.ToString();
PlaceHolder ph = new PlaceHolder();
ph.ID = "ph" + i.ToString();
ph.Controls.Add(new LiteralControl("<h1>Step." + i.ToString() + "</h1>"));
TextBox tb = new TextBox();
tb.ID = "step" + i.ToString() + "tb";
ph.Controls.Add(tb);
step1.Controls.Add(ph);
wizard1.WizardSteps.Add(step1);
}
wizard1.FinishButtonClick += atWizardCompleted;
wizard_container.Controls.Add(wizard1);
well, I found the solution by using Control.Find().