|
-
Feb 10th, 2007, 10:28 AM
#1
Thread Starter
Member
[RESOLVED] createuserwizard error
Hi there I have a createuserwizard that I wish to store the userid in an additional table as well as the default aspnet_user table
i am using vb, the code is as follows
Protected Sub CreateUserWizard1_CreatedUser(ByVal sender As Object, ByVal e As System.EventArgs) Handles CreateUserWizard1.CreatedUser
Dim objTextBox1 As TextBox
objTextBox =
objTextBox1 = CreateUserWizard1.CreateUserStep.ContentTemplateContainer.FindControl("UserName")
Dim user As MembershipUser = Membership.GetUser(objTextBox1.Text)
Dim UserGUID As Object = user.ProviderUserKey
' some code to update database ----
End Sub
this should return the new users UseID and there are tons of tutorials anf forums saying it does but when I use it I get a
InvalidCastException - specified cast is not Valid which points to
Dim user As MembershipUser = Membership.GetUser(objTextBox1.Text)
anyone have anyideas as i am told this should work
lee
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|