M
Mark Olbert
I'm running into a weird problem debugging an ASPX page that contains a Wizard.
The problem is that I need to access the state of a control (e.g., the selection status of CheckBoxList items) after clicking Next
to take me away from the WizardStep where the control is located.
What happens is that the page instance gets recreated, so naturally the state of the control I'm interested in gets reset to its
default values. I've verified that the page instance gets recreated by using the following approach:
public partial class page_class
{
private static int lastID = 0;
private int instanceID = -1;
public page_class()
{
instanceID = lastID++;
...
}
....
}
Monitoring the value of instanceID shows that it's not the same after the Next Step event gets handled as it is before it's handled.
So how do I persist the state of the controls from a WizardStep once I move off of it??
- Mark
The problem is that I need to access the state of a control (e.g., the selection status of CheckBoxList items) after clicking Next
to take me away from the WizardStep where the control is located.
What happens is that the page instance gets recreated, so naturally the state of the control I'm interested in gets reset to its
default values. I've verified that the page instance gets recreated by using the following approach:
public partial class page_class
{
private static int lastID = 0;
private int instanceID = -1;
public page_class()
{
instanceID = lastID++;
...
}
....
}
Monitoring the value of instanceID shows that it's not the same after the Next Step event gets handled as it is before it's handled.
So how do I persist the state of the controls from a WizardStep once I move off of it??
- Mark