的CreateUserWizard一步帐户创建后更改的问题帐户、问题、CreateUserWizard

由网友(后来奔忙)分享简介:我想改变createuserwizard.step =如果邮件发送失败开始,而不是去创建成功的一步。I want to change the createuserwizard.step= start if the mail sending fails and not to go to successful creat...

我想改变createuserwizard.step =如果邮件发送失败开始,而不是去创建成功的一步。

I want to change the createuserwizard.step= start if the mail sending fails and not to go to successful creation step.

                 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;
    }

但例外说步骤类型不能改变。因此,如何做到这一点。我停下来的意思,从去成功的一步。

but the exception says the steptype can't be changed. So how to do this. I mean to stop from going to success step.

推荐答案

,因为你需要使用的 Wizard.MoveTo方法。

这样的:

CreateUserWizard1.MoveTo(WizardStep1);

在哪里WizardStep1是 ASP的编号:的WizardStep 要回去(在开始步)

Where "WizardStep1" is the ID of the asp:WizardStep that you want to go back to (the "start" step).

阅读全文

相关推荐

最新文章