Getting avatar data

  Previous topic Next topic JavaScript is required for the print function Mail us feedback on this topic! Mail us feedback on this topic!  

The following sample code shows how you can get an avatar as an AvatarInfo object:

 

[C#]

 

using CMS.SiteProvider;

 

...

 

        // Get avatar object by AvatarID

      AvatarInfo ai = AvatarInfoProvider.GetAvatarInfo(1);

 

 

      // Get avatar object by AvatarName

      AvatarInfo ai2 = AvatarInfoProvider.GetAvatarInfo("AvatarName");

 

The following sample code shows how you can get a DataSet containing all avatars in the system with an AvatarID greater than 5, ordered by their name:

 

[C#]

 

using System.Data;

using CMS.SiteProvider;

 

...

 

      // Get DataSet of avatar objects

      DataSet ds = AvatarInfoProvider.GetAvatars("AvatarID > 5" , "AvatarName");

 

Page url: http://devnet.kentico.com/docs/devguide/index.html?getting_avatar_data.htm