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

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

Syntax

C#
[ObsoleteAttribute("Deprecated in Platform 8.0.0. Please use UserController.Instance.GetUserProfilePictureUrl")]
public static string UserProfilePicRelativeUrl(
	bool includeCdv
)
Visual Basic
<ObsoleteAttribute("Deprecated in Platform 8.0.0. Please use UserController.Instance.GetUserProfilePictureUrl")> 
Public Shared Function UserProfilePicRelativeUrl ( 
	includeCdv As Boolean
) As String

Parameters

includeCdv
Type: System..::..Boolean
Indicates if cdv (Cache Delayed Verification) has to be included in the returned URL.

Return Value

Formatted url, e.g. /DnnImageHandler.ashx?userid={0}&h={1}&w={2} considering child portal

Remarks

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

See Also