Use the WizardNavigationEventArgs.Cancel property to cancel the move to the next step (in the NextButtonClick
event)), rather than your current approach:
if (e.CurrentStepIndex == 1)
{
if (LabelCustomerNotify.Text == "notset")
{
LabelCustomerNotify.Text = "You can not proceed without selecting customer id";
e.Cancel = true;
}
}
If it's still not working right, I would run a debugger and make sure that your code is actually entering that if-block. You might just be having an issue with the condition.