Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

Affordable ASP.NET Hosting Service
  Ads  
Active Modules -- Active Forums for DotNetNuke
 


  Sponsors  

Meet Our Sponsors

OnyakTech
The best choice for your web site host, email hosting, and domain registration.
CrystalTech Web Hosting™
Webhost4life, specialists in DNN hosting
Mad Development is a full service interactive agency focusing on the merge of design, technology, e-commerce, and affiliate marketing by providing total website solutions.
AspDotNetStoreFront - E-Commerce by Design - The Leading ASP.NET shopping cart platform for developers!
 


DotNetNuke Forums
 
  Forum  General DotNetN...  Extend It! ( Pr...  Userinfo.Profile.getPropertyValue in manageUser.ascx.vb
Previous Previous
 
Next Next
New Post 8/26/2008 1:07 PM
Resolved
User is offline tfs
25 posts
10th Ranked


Userinfo.Profile.getPropertyValue in manageUser.ascx.vb 

Dear experts,

I insert the following line in ManageUser.ascx.vb under "Sub ProfileUpdateCompleted()"

DotNetNuke.Services.Mail.Mail.SendMail(Reply-to-email@123456.com, PortalSettings.email, "", "Email Subject", user.Username + userinfo.profile.getpropertyvalue("CustomField").tostring + userinfo.profile.getpropertyvalue("City").tostring,"", "HTML", "", "", "", "")

I can receive this email and can see the username BUT NOT the CustomField value and the City value. They are empty string in the email. I am sure there is value in the CustomField and City. CustomField is a new profile field I created, while City is the come-with property field in profile. I also try to do  and it still send an empty string.

I read a lot of threads and they said "userinfo.profile.getpropertyvalue("Propertyname").tostring" can pull up any value from UserProperty table. Did I miss something ?

Pls advise.

 

 
New Post 8/26/2008 8:41 PM
User is offline b471code3
134 posts
www.froggeyestudios.com
9th Ranked


Re: Userinfo.Profile.getPropertyValue in manageUser.ascx.vb 

Are you sure you are getting the profile information correctly?  Here is a post to double check...

http://www.dotnetnuke.com/Community/Forums/tabid/795/forumid/111/threadid/248418/scope/posts/Default.aspx

 

 
New Post 8/27/2008 8:34 AM
User is offline tfs
25 posts
10th Ranked


Re: Userinfo.Profile.getPropertyValue in manageUser.ascx.vb 

HI, thanks for the reply.

I have the following lines under ProfileUpdateCompleted() in ManagerUser.ascx.vb

Dim myusers as New UserController()

Dim myuser as UserInfo = myusers.GetUser(PortalId, userId)

DotNetNuke.Services.Mail.Mail.SendMail("reply-to@12345.com", PortalSettings.email, "", "Email subject","username=" +user.Username + ", " + user.Profile.ProfileProperties.GetByName("City"),"", "HTML", "", "", "", "")

When I hit [UPDATE] in the Manage Profile page, it results as the following error and no email was sent.

A critical error has occurred.
Object reference not set to an instance of an object.

Did I miss anything?

What's the difference between GetByName and GetPropertyValue ?

Thank you in advance.

 
New Post 8/28/2008 10:17 AM
Accepted Answer 
User is offline b471code3
134 posts
www.froggeyestudios.com
9th Ranked


Re: Userinfo.Profile.getPropertyValue in manageUser.ascx.vb 
Modified By b471code3  on 8/28/2008 12:18:13 PM)

 tfs wrote
 

user.Profile.ProfileProperties.GetByName("City"),"", "HTML", "", "", "", "")

It appears you only have part of what you need for the ProfileProperty.  Try this:

 

user.Profile.ProfileProperties.GetByName("City").PropertyValue

 
New Post 9/4/2008 10:45 AM
User is offline tfs
25 posts
10th Ranked


Re: Userinfo.Profile.getPropertyValue in manageUser.ascx.vb 

Bingo. Thank you so much.

 
Previous Previous
 
Next Next
  Forum  General DotNetN...  Extend It! ( Pr...  Userinfo.Profile.getPropertyValue in manageUser.ascx.vb
 


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, 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 DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

 


Active Modules, Inc.
Creators of Active Forums, the best forum module for DotNetNuke
www.activemodules.com
DotNetNuke Marketplace - Modules & Skins
The DotNetNuke Marketplace is the official e-commerce gateway for the DNN ecosystem. It's the place to buy and sell DotNetNuke modules, DotNetNuke skins, and other DNN offerings.
DotNetNuke Marketplace
ExactTarget Email Marketing Software and Solutions
ExactTarget delivers on-demand email software solutions for permission-based email marketing. ExactTarget offers solutions that meet the needs of all industry verticals and all size organizations, including SMB, corporate divisions, not-for-profits, large retail/direct marketers, agencies and enterprises.
ExactTarget.com

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP