I am trying to programatically disable my custom wizard page's Next button using the EnableStep method of the wizard class.
this.EnableStep(false);
But this isn't working. Is there any other way to control the enable property of the different wizard buttons

disable button...
Philippe2
I want to force the user to go through all wizard pages, not all the elements of a single page. This is done automatically if you don't overload IsValid.
mike11d11
LauraK
bool enable = /* however you want to set it */ false;
Wizard.EnableButton(Microsoft.WizardFramework.ButtonType.Next, enable);
WileyWes
try this...
private
void Button4_Click(object sender, System.EventArgs e){
this.Button4.Enabled=false;
}
JinMengcheng
JoachimP
Wizard.EnabledButton(Microsoft.WizardFramework.ButtonType.Finish, false);
...doesn't work to disable "step skipping", I tried it in the Load event and the constructor of my CustomWizardPage.
Is there any way to force the user to pass through every step before hitting the Finish button
MsMe
I had the same problem and because I came to a solution, I thought to share it whith others. The code bellow has been put inside the page where wizard control sits. It will disable all submit buttons from the page until the page is again fully loaded.
<
script type="text/javascript"> if (typeof(__doPostBack) == "function"){
var Original__doPostBack = __doPostBack;__doPostBack =
function(eventTarget, eventArgument){
DisableWizardButtons();
Original__doPostBack(eventTarget, eventArgument);
}
}
function DisableWizardButtons(){
var els = document.getElementsByTagName('input'); for (i=0;i<els.length;i++){
if (els{
els
.disabled =
true;}
}
}
</
script>