Greetings...
I added two new custom profile properties (see below) to my DNN portal and the issue I'm having is that if a new user leaves the Text field blank during registration, then I receive System.NullReference errors in my module when trying to view/retrieve anything they would have typed in that field.
I'm trying to retrieve the value by doing this:
Dim strAAA_ID As String = UserInfo.Profile.ProfileProperties.GetByName("AAA Member ID").PropertyValue.ToString
The error goes away if the user goes back into their profile and enters something in that custom Text field, hits Update, then goes back again and deletes the text, and Update again.
Is the GetByName function looking for a database entry or field in the user's profile/membership??? that wouldn't have been created from the initial registration because they naturally would leave the text field blank if they don't have a membership id?
The two custom profile properties:
Property Name: AAA Member?
DataType: List (the list entries are simply "Yes" or "No")
Property Category: AAA Membership
Required: True
Visible: True
Property Name: AAA Member ID
DataType: Text
Property Category: AAA Membership
Default Value:
Required: False
Visible: True
Thanks in advance for any assistance.
Ben