Click or drag to resize
UrlHelperExtensionsAvatarUrl Method
Returns avatar URL for user specified by user name.

Namespace: Kentico.Membership.Web.Mvc
Assembly: Kentico.Web.Mvc (in Kentico.Web.Mvc.dll) Version: 13.0.131
Syntax
C#
public static string AvatarUrl(
	this UrlHelperExtensionPoint instance,
	string userName,
	string pathToDefaultAvatar = "",
	int maxSideSize = 0,
	int width = 0,
	int height = 0
)

Parameters

instance
Type: Kentico.Web.MvcUrlHelperExtensionPoint
The object that provides methods to build URLs to Kentico content.
userName
Type: SystemString
User name.
pathToDefaultAvatar (Optional)
Type: SystemString
Path to default avatar image.
maxSideSize (Optional)
Type: SystemInt32
Max side size of avatar image (Not applied on default avatar).
width (Optional)
Type: SystemInt32
Width of avatar image (Not applied on default avatar).
height (Optional)
Type: SystemInt32
Height of avatar image (Not applied on default avatar).

Return Value

Type: String

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type UrlHelperExtensionPoint. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
Exceptions
ExceptionCondition
ArgumentNullExceptioninstance is null.
See Also