Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CreateUserWizard

Status
Not open for further replies.

Waynest

Programmer
Jun 22, 2000
321
GB
Hi
My site needs to allow admins to create new accounts.

I've used the CreateUserWizard which has been quite painless.

I now need to update some custom profile fields for the newly created user (not the currently logged on admin user).

Any ideas how I might do this? I'm thinking I probably need to capture the username from the wizard somehow & then need some code to update the profile of a specified user.

Thanks!
 
Hi Waynest,

Where are you storing these custom profiles?

You can get back the complete list of usernames by:-

Code:
Imports System.Security

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

        If Not Page.IsPostBack Then
            BindMembers()
        End If 'postback
    End Sub
    Private Sub BindMembers()

        DGMembers.DataSource = Membership.GetAllUsers()
        DGMembers.DataBind()

End Sub

Where DGMembers is a DataGrid

You could then use this to update the table that holds the custom profiles based on the username.

The code you need is to simply update the table fields where the username = the username from the grid.
You could also use the userId instead.

HTH

Jon




 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top