In my update Membership account routine, I have the sub:
Protected Sub Wizard1_FinishButtonClick(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.WizardNavigationEventArgs) Handles Wizard1.FinishButtonClick
'Update this account in the database
Membership.GetUser.Email = TextBoxEmail.Text
Membership.GetUser.ChangePasswordQuestionAndAnswer(HiddenFieldConfirmPassword.Value, TextBoxQuestion.Text, TextBoxAnswer.Text)
Dim dcMembership As New MembershipDataContext()
Dim vUserId As Guid = Membership.GetUser.ProviderUserKey
Dim vMembershipRecord = dcMembership.wmsUsersPlus.SingleOrDefault(Function(x) x.UserID = vUserId)
If vMembershipRecord IsNot Nothing Then
vMembershipRecord.FirstName = TextBoxFirstName.Text
vMembershipRecord.LastName = TextBoxLastName.Text
This sub runs successfully and everything is updated, including the membership question and answer, except the membership.getuser.email address which is not updated.
In de-bug mode, TextBoxEmail.text contains the updated email address but the membership record is not updated.
Conversely, I can get the current email address successfully earlier in the code with:
TextBoxEmail.text = Member
View Complete Post