IdenticonTagHelperHash Property

Gets or sets a hash that will be used as base for this icon.
public byte[] Hash { get; set; }

Property Value

Byte

Exceptions

ExceptionCondition
ArgumentExceptionvalue does not contain 6 bytes.

Remarks

The hash must contain at least 6 bytes.

If both identicon-hash and identicon-value is specified, identicon-hash has precedence.

Examples

In the following example identicon-hash is used to render an identicon for a user id.

Using identicon-hash
@{
    var userIdHash = new byte[] { 242, 94, 85, 42, 87, 222, 222, 190, 155, 231, 226, 21, 195, 40, 18, 137 };
}
<img identicon-hash="userIdHash" width="100" height="100" /&lt;

See Also

Reference