Đang chuẩn bị liên kết để tải về tài liệu:
ASP.NET 4 Unleased - p 121

Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ

Using the Login Controls protected void CreateUserWizard1_SendingMail(object sender, MailMessageEventArgs e) { MembershipUser user = Membership.GetUser(CreateUserWizard1.UserName); string code = user.ProviderUserKey.ToString(); e.Message.Body = e.Message.Body.Replace(“”, code); } CreateUserWizard Code Confirmation | 1174 CHAPTER 26 Using the Login Controls protected void CreateUserWizard1_SendingMail object sender MailMessageEventArgs e Membershipuser user Membership.GetUser CreateUserWizardl.UserName string code user.ProviderUserKey.ToString e.Message.Body e.Message.Body.Replace ConfirmationCode code script html xmlns http www.w3.org 1999 xhtml head id Head1 runat server title CreateUserWizard Code Confirmation title head body form id form1 runat server div asp CreateUserWizard id CreateUserWizard1 CompleteSuccessText A confirmation email containing your new password has been sent to your email address. DisableCreatedUser true ContinueDestinationPageUrl ConfirmCode.aspx OnSendingMail CreateUserWizard1_SendingMail Runat server MailDefinition From Admin@YourSite.com BodyFileName CodeConfirmation.htm IsBodyHtml true Subject Registration Confirmation asp CreateUserWizard div form body html The page in Listing 26.23 includes a SendingMail event handler. The confirmation code is the unique key assigned to the new user by the membership provider a GUID . The confirmation code is substituted into the email message before the message is sent. The email message is contained in Listing 26.24. From the Library of Wow eBook Using the CreateUserWizard Control 1175 LISTING 26.24 CodeConfirmation.htm DOCTYPE html PUBLIC - W3C DTD XHTML 1.0 Transitional EN http www.w3.org TR xhtml1 DTD xhtml1-transitional.dtd html xmlns http www.w3.org 1999 xhtml head title Code Confirmation title head body UserName your confirmation code is ConfirmationCode body html After you complete the form rendered by the CreateUserWizard control you can click the Continue button to open the ConfirmCode.aspx page in Listing 26.25 see Figure 26.9 . FIGURE 26.9 Entering a confirmation code. 26 From the Library of Wow eBook 1176 CHAPTER 26 Using the Login Controls LISTING 26.25 ConfirmCode.aspx @ Page Language C DOCTYPE html PUBLIC - W3C DTD XHTML 1.0 Transitional EN http www.w3.org TR xhtml1 DTD xhtml1-transitional.dtd .

TÀI LIỆU LIÊN QUAN
TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.