mysql - Changing usernames in asp.net Membership -


OK, so I want an administrator for the option that I want to change someone's username in Gridview such as I Change his email, comment, etc. My codes are:

  Protected Zero UserAccounts_RowEditing (Object Sender, GridViewEditEventArgs e) {UserAccounts.EditIndex = e.NewEditIndex; BindUserAccounts (); } Secure Zero UserAccounts_RowUpdating (Object Sender, GridViewUpdateEventArgs e) {int index = UserAccounts.EditIndex; GridViewRow line = UserAccounts.Rows [e.RowIndex]; Username = User Account Ro [e. Roidind] .cell [1]. Text; Email = ((Textbox) Line Seals [2]. Control [0]). Text; Approved = ((checkbox) row Seals [3]. Control [0]). Comment = ((text box) row. Seals [6]. Control [0]). Text; Membership User User = Membership User (username); If (user! = Null) {bool edited = false; ActionStatus.Text = string.Format ("font size = 4> gt;  & lt; u & gt; Edit {0} & lt; / u & gt; & lt; / b & Gt; & lt; / font & gt; ", user name); If (! User.Email.Equals (email)) {edited = true; User.Email = Email; ActionStatus.Text + = "& lt; br / & gt; Email has been successfully updated!"; } If (! User.IsAprproved == accepted changes) {edit = true; User.IsApproved = Approved Changes; ActionStatus.Text + = "& lt; br / & gt; The accepted status has been successfully updated!"; } If (commented user! Comments (comments)) {edit = true; the user. Comment = comment; ActionStatus.Text + = "
The comment has been updated successfully!"; } If (edited) subscribe. User (user); Else ActionStatus.Text + = string.Format ("& lt; br / & gt; You have not edited any details of any {0}, so they have not been updated!", Username); } And ActionStatus.Text + = string.Format ("Error: user == tap"); UserAccounts.EditIndex = -1; BindUserAccounts (); }

Well, how can I do this? Thanks for helping!

Subscription Provider does not allow user to change

Subscriptions. Update user (user);

  • IsApproved
  • LastLoginDate
  • >

    If you want to change it, then you have to create a function outside the subscription provider.


  • Comments

    Popular posts from this blog

    winforms - C# Form - Property Change -

    java - Messages from .properties file do not display UTF-8 characters -

    javascript - amcharts makechart not working -