I have a Wizard page and need to affect the next and previous buttons from
my code-behind. I've googled around and found two solutions, and neither
appear to work.
I can access the SideBarList steps successfully with the following code...
Control myContainer =
(Control)Wizard 1.FindControl(" SideBarContaine r");
DataList mySideBarList =
(DataList)myCon tainer.FindCont rol("SideBarLis t");
mySideBarList.E nabled = false;
Trying to take this approach with the StepNavigationT emplate does not seem
to work. I first converted the step navigation to a template but I cannot
get findcontrol to find anything in "StepNavigation Container" or
"StepNavigation Template" or anything else I can think of.
I have also tried putting .hidden {display:none} in my .css file and ....
protected void Wizard1_ActiveS tepChanged(obje ct sender, EventArgs e)
{
if (Wizard1.Active StepIndex == 3)
{
Wizard1.StepPre viousButtonStyl e.CssClass = "hidden";
Wizard1.StepNex tButtonStyle.Cs sClass = "hidden";
}
}
This has the effect of not working when goint to step 3 as the Prev/finish
still show. However if the prev button is hit, step 2 shows with the next
button not visible.
Is there a solution to this problem? Is there a reliable way to access
these buttons?
Thanks,
Gary
my code-behind. I've googled around and found two solutions, and neither
appear to work.
I can access the SideBarList steps successfully with the following code...
Control myContainer =
(Control)Wizard 1.FindControl(" SideBarContaine r");
DataList mySideBarList =
(DataList)myCon tainer.FindCont rol("SideBarLis t");
mySideBarList.E nabled = false;
Trying to take this approach with the StepNavigationT emplate does not seem
to work. I first converted the step navigation to a template but I cannot
get findcontrol to find anything in "StepNavigation Container" or
"StepNavigation Template" or anything else I can think of.
I have also tried putting .hidden {display:none} in my .css file and ....
protected void Wizard1_ActiveS tepChanged(obje ct sender, EventArgs e)
{
if (Wizard1.Active StepIndex == 3)
{
Wizard1.StepPre viousButtonStyl e.CssClass = "hidden";
Wizard1.StepNex tButtonStyle.Cs sClass = "hidden";
}
}
This has the effect of not working when goint to step 3 as the Prev/finish
still show. However if the prev button is hit, step 2 shows with the next
button not visible.
Is there a solution to this problem? Is there a reliable way to access
these buttons?
Thanks,
Gary
Comment