|
-
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
-
Feb 10th, 2007, 11:17 AM
#2
Thread Starter
Member
fixed the problem dont have the answer what it was but deleted the database and recreated and it works, microsoft say it happens if you edit the aspnet tables directly without using tools like asp.net configurator
it works now anyway
thanks all 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
|