2023-02-16 325
我想更改createUserWizard.step = start如果邮件发送失败而不是成功创建步骤.
catch (SmtpException ex)
{
Membership.DeleteUser(textboxemail.Text.Trim());
Literal errorMessage=(Literal) CreateUserWizard1.CreateUserStep.ContentTemplateContainer.FindControl("ErrorMessage");
errorMessage.Text = "Account creation failed due to email notification."+ ex.Message + " errorcode" +ex.StatusCode + "; inner exception; " + ex.InnerException;
CreateUserWizard1.CreateUserStep.StepType = WizardStepType.Start;
}
但异常说Steptype无法更改.所以怎么做到这一点.我的意思是停止去成功步骤.
您正在获得该异常,因为您需要使用 wizard.moveto方法.
如下:
CreateUserWizard1.MoveTo(WizardStep1);
“wizardstep1″是您要返回的asp:WizardStep的ID(“开始”步骤).
以上所述是小编给大家介绍的创建账户后CreateUserWizard步骤改变的问题,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对77isp云服务器技术网的支持!
原文链接:https://77isp.com/post/34095.html
=========================================
https://77isp.com/ 为 “云服务器技术网” 唯一官方服务平台,请勿相信其他任何渠道。
数据库技术 2022-03-28
网站技术 2022-11-26
网站技术 2023-01-07
网站技术 2022-11-17
Windows相关 2022-02-23
网站技术 2023-01-14
Windows相关 2022-02-16
Windows相关 2022-02-16
Linux相关 2022-02-27
数据库技术 2022-02-20
抠敌 2023年10月23日
嚼餐 2023年10月23日
男忌 2023年10月22日
瓮仆 2023年10月22日
簿偌 2023年10月22日
扫码二维码
获取最新动态