1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / TelerikUserMetaInfo.. How to GetMetaData?

TelerikUserMetaInfo.. How to GetMetaData?

3 posts, 0 answered
  1. Matthew
    Matthew avatar
    33 posts
    Registered:
    15 Dec 2008
    23 Jan 2009
    Link to this post
    I'm a bit lost on how to retrieve User Meta Info.. I assumed that it would be similar to how News or Event Content is consumed.. ie: .GetMetaData("Title"), but I can't quite figure it out. Is there some way to fill a TelerikUserMetaInfo object by it's MetaData and key?

    Right now I have... 

            UserManager manager = new UserManager();
            MembershipUser user = manager.GetUser(Page.User.Identity.Name);

    but don't see MetaData anywhere when debugging...

    Thanks,
    Matt
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    23 Jan 2009
    Link to this post
    Hi Matthew,

    Check out the example below. It returns the user's FirstName profile property value.

    ProfileBase profile = ProfileBase.Create("admin"); 
    string fName = (string)profile.GetPropertyValue("FirstName"); 
     if (string.IsNullOrEmpty(fName)) 
     Response.Write("The user FirstName is empty"); 
       else 
        { 
          Response.Write(fName); 
        } 

    If you have different Property values you can get them in the same way.

    Kind regards,
    Ivan Dimitrov
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. Matthew
    Matthew avatar
    33 posts
    Registered:
    15 Dec 2008
    23 Jan 2009
    Link to this post
    Once again, thanks for the help. 

    Matt
Register for webinar
3 posts, 0 answered