如何拒绝移动到下一个WizardPage在.net中?WizardPage、net

2023-09-06 14:20:03 作者:满盘皆输

我使用的向导控制在V​​S 2008我搜索了下一个按钮编码从net.vI想,如果用户ID和密码不匹配,那么向导页不能移动到下一个步骤。

I am using Wizard control in VS 2008. I searched the next button coding from net.vI want that if user id and password not match then wizard page should not move to the next step.

推荐答案

订阅OnNextButtonClick事件,做你的valiadation。如果验证失败设置取消WizardNavigationEventArgs的属性设置为true。

Subscribe to the OnNextButtonClick event and do your valiadation. If your validation fail set the cancel property of the WizardNavigationEventArgs to true.

protected void ClientWizard_NextButtonClick(object sender, WizardNavigationEventArgs e)
{
  if(password dont match ....)
  e.Cancel = true;
}
 
精彩推荐
图片推荐