的CreateUserWizard一步帐户创建后更改的问题 [英] CreateUserWizard step changing issue after account creation

查看:193
本文介绍了的CreateUserWizard一步帐户创建后更改的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想改变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).

这篇关于的CreateUserWizard一步帐户创建后更改的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆