开发者

SendingMail is not being called when user is created from the CreateUserWizard Control in asp.net?

I have the OnSendingMail event declared in the CreateUserWizard markup. I have the code in the code-behind file as well as the mail settings in the web.config, yet if I put a break point on the SendingMail method, it doesn't even hit the break point and I can't figur开发者_如何学编程e out why it is not happening.

Here is my SendingMail method:

protected void CreateUserWizard1_SendingMail(object sender, MailMessageEventArgs e)
{
    MembershipUser user = Membership.GetUser(CreateUserWizard1.UserName);

    string loginurl = "http://localhost:2030/login.aspx";

    e.Message.Body = e.Message.Body.Replace("<%VerifyUrl%>", loginurl);

}


I don't know why this was the issue, but I basically had to recreate the CreateUserWizard1_SendingMail and then it magically worked.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜