Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0custom Profile Property, how to check if null/missing, etc???custom Profile Property, how to check if null/missing, etc???
Previous
 
Next
New Post
5/3/2007 2:42 PM
 

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

 
New Post
5/3/2007 4:06 PM
 

nevermind...

I found the proper syntax here - How to Retrieve User Profile Properties

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0custom Profile Property, how to check if null/missing, etc???custom Profile Property, how to check if null/missing, etc???


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out