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 from the system with an ID greater than 5 ordered by their name:
[C#]
using System.Data; using CMS.SiteProvider;
...
string where = "AvatarID > 5"; string orderBy = "AvatarName";
// Get DataSet of avatar objects according to the given parameters DataSet ds = AvatarInfoProvider.GetAvatars(where, orderBy); |
Page url: http://devnet.kentico.com/docs/5_5r2/devguide/index.html?api_getting_avatar_data.htm