Return User Profile Picture Formatted Url. UserId, width and height can be passed to build a formatted Avatar Url.

Namespace: DotNetNuke.Common
Assembly: DotNetNuke (in DotNetNuke.dll)

Syntax

C#
[ObsoleteAttribute("Obsoleted in DNN 7.3.0 as it causes issues in SSL-offloading scenarios - please use UserProfilePicRelativeUrl instead.")]
public static string UserProfilePicFormattedUrl()
Visual Basic
<ObsoleteAttribute("Obsoleted in DNN 7.3.0 as it causes issues in SSL-offloading scenarios - please use UserProfilePicRelativeUrl instead.")> 
Public Shared Function UserProfilePicFormattedUrl As String

Return Value

Formatted url, e.g. http://www.mysite.com/DnnImageHandler.ashx?mode=profilepic&userid={0}&h={1}&w={2}

Remarks

Usage: ascx - <asp:Image ID="avatar" runat="server" CssClass="SkinObject" /> code behind - avatar.ImageUrl = string.Format(Globals.UserProfilePicFormattedUrl(), userInfo.UserID, 32, 32)

See Also