Icon Class

Renders and displays an identicon on a web page.
public class Icon : Image


In this example a static identicon is displayed on the page.
<jdenticon:Icon runat="server" StringValue="Example" Size="60" />


Public methodIcon
Initializes a new instance of the Icon class


Public propertyFormat
Gets or sets the format in which the icon will be generated. If no format is specified a PNG file is generated.
Public propertyHash
Gets or sets the hash that the icon will be based on.
Protected propertyHashCore
Gets or sets the compacted hash.
Public propertyHeight
Gets or sets the height of the Web server control.
Public propertySize
Gets or sets the size of the generated icon in pixels. If no size is specified a 64 pixel icon is generated.
Public propertyCode exampleStringValue
Gets or sets the value whose hash will be used as base for the icon.
Public propertyCode exampleValue
Gets or sets the value whose hash will be used as base for the icon.
Public propertyWidth
Gets or sets the width of the Web server control.


This example shows how to bind to the Value property in a Repeater.
ASPX file
<asp:Repeater ID="repeater" runat="server">
        Value: <asp:Literal runat="server" Text='<%# Container.DataItem %>' />: <br/>
        <jdenticon:Icon runat="server" Value='<%# Container.DataItem %>' Size="60" /> <br/><br/>
Code-behind file
protected void Page_Load(object sender, EventArgs e)
    repeater.DataSource = new object[]

See Also