Update email adress membershipuser

Discussion in 'ASP .Net' started by =?Utf-8?B?TGlubg==?=, Jun 6, 2006.

  1. Hi,
    I am trying to update the e-mail for å user (as an admin), but the new
    e-mail address is not saved.
    The msgbox gives met he correct email, but when I reload my data in the
    gridview, the old value is displayed.

    Anyone any idea?

    Dim user As MembershipUser
    Dim bruker as string
    bruker = CType(sender, GridView).DataKeys(e.RowIndex).Value
    user = Membership.GetUser(bruker)

    user.Email = CType(CType(sender,
    GridView).Rows(e.RowIndex).Cells(4).Controls(0), TextBox).Text
    MsgBox(user.Email)
    MsgBox(bruker)
    =?Utf-8?B?TGlubg==?=, Jun 6, 2006
    #1
    1. Advertising

  2. =?Utf-8?B?TGlubg==?=

    Ray Booysen Guest

    Don't you need to call an update method to save it?

    Linn wrote:
    > Hi,
    > I am trying to update the e-mail for å user (as an admin), but the new
    > e-mail address is not saved.
    > The msgbox gives met he correct email, but when I reload my data in the
    > gridview, the old value is displayed.
    >
    > Anyone any idea?
    >
    > Dim user As MembershipUser
    > Dim bruker as string
    > bruker = CType(sender, GridView).DataKeys(e.RowIndex).Value
    > user = Membership.GetUser(bruker)
    >
    > user.Email = CType(CType(sender,
    > GridView).Rows(e.RowIndex).Cells(4).Controls(0), TextBox).Text
    > MsgBox(user.Email)
    > MsgBox(bruker)
    >
    Ray Booysen, Jun 6, 2006
    #2
    1. Advertising

  3. There is no update method on MembershipUser (nor save as on ProfileCommon)


    "Ray Booysen" wrote:

    > Don't you need to call an update method to save it?
    >
    > Linn wrote:
    > > Hi,
    > > I am trying to update the e-mail for å user (as an admin), but the new
    > > e-mail address is not saved.
    > > The msgbox gives met he correct email, but when I reload my data in the
    > > gridview, the old value is displayed.
    > >
    > > Anyone any idea?
    > >
    > > Dim user As MembershipUser
    > > Dim bruker as string
    > > bruker = CType(sender, GridView).DataKeys(e.RowIndex).Value
    > > user = Membership.GetUser(bruker)
    > >
    > > user.Email = CType(CType(sender,
    > > GridView).Rows(e.RowIndex).Cells(4).Controls(0), TextBox).Text
    > > MsgBox(user.Email)
    > > MsgBox(bruker)
    > >

    >
    =?Utf-8?B?TGlubg==?=, Jun 6, 2006
    #3
  4. Figured out...
    Membership.UpdateUser(bruker)
    Could be what you ment, Roy, I just did not get it :)
    Thanks anyway.



    "Linn" wrote:

    > There is no update method on MembershipUser (nor save as on ProfileCommon)
    >
    >
    > "Ray Booysen" wrote:
    >
    > > Don't you need to call an update method to save it?
    > >
    > > Linn wrote:
    > > > Hi,
    > > > I am trying to update the e-mail for å user (as an admin), but the new
    > > > e-mail address is not saved.
    > > > The msgbox gives met he correct email, but when I reload my data in the
    > > > gridview, the old value is displayed.
    > > >
    > > > Anyone any idea?
    > > >
    > > > Dim user As MembershipUser
    > > > Dim bruker as string
    > > > bruker = CType(sender, GridView).DataKeys(e.RowIndex).Value
    > > > user = Membership.GetUser(bruker)
    > > >
    > > > user.Email = CType(CType(sender,
    > > > GridView).Rows(e.RowIndex).Cells(4).Controls(0), TextBox).Text
    > > > MsgBox(user.Email)
    > > > MsgBox(bruker)
    > > >

    > >
    =?Utf-8?B?TGlubg==?=, Jun 7, 2006
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. brett_fyisystems

    MembershipUser implementation

    brett_fyisystems, Nov 2, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    670
    brett_fyisystems
    Nov 2, 2005
  2. Courtis Joannis

    email-adress

    Courtis Joannis, Feb 24, 2005, in forum: Python
    Replies:
    1
    Views:
    379
    Kartic
    Feb 24, 2005
  3. Cliff
    Replies:
    2
    Views:
    333
    Cliff
    Feb 14, 2007
  4. Jeff

    updating Membershipuser.Email

    Jeff, Mar 25, 2008, in forum: ASP .Net
    Replies:
    2
    Views:
    329
  5. CSharpner
    Replies:
    1
    Views:
    812
Loading...

Share This Page