View Single Post
  #6 (permalink)  
Old March 8th, 2006, 06:00 PM
Imar's Avatar
Imar Imar is offline
Wrox Author
Points: 72,073, Level: 100
Points: 72,073, Level: 100 Points: 72,073, Level: 100 Points: 72,073, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Is this all the code for the CreateUserWizard?

If so, you should be getting other errors, because you don't have the username and other controls on it.

If you have them, but didn't post them, remove the MobileNumber from the profile code. I think you looked at C# code where you cast by doing something like this:

(MyStronglyTypedObject)SomeObject

to turn SomeObject into MyStronglyTypedObject.

However, VB.NET uses CType for that. Besides, you can't cast to MobileNumber, because that's not a valid class. Instead, the number is an int (not a very good choice though), so you should cast / convert the Text property to an Integer:

myProfile.MobileNumber = Convert.ToInt32(myTextbox.Text)

HtH,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.