Jdenticon.AspNet.WebForms Namespace

Classes for using Jdenticon from ASP.NET WebForms. This namespace contains a web control to be used in .aspx pages and an IHttpHandler that serves icons.

Classes

Public classCode exampleIcon
Renders and displays an identicon on a web page.
Public classIdenticonHttpHandler
IHttpHandler implementation used to serve icons.

Examples

The Jdenticon.AspNet.WebForms assembly contains the Icon web control that can be used on web pages. Install the assembly by using NuGet Package Manager.

NuGet Package Manager
PM> Install-Package Jdenticon.AspNet.WebForms

This example shows a web page where an Icon is data bound in a Repeater.

ASPX file
<asp:Repeater ID="repeater" runat="server">
    <ItemTemplate>
        Value: <asp:Literal runat="server" Text='<%# Container.DataItem %>' />: <br/>
        <jdenticon:Icon runat="server" Value='<%# Container.DataItem %>' Size="60" /> <br/><br/>
    </ItemTemplate>
</asp:Repeater>
Code-behind file
protected void Page_Load(object sender, EventArgs e)
{
    repeater.DataSource = new object[]
    {
        123,
        124,
        "Item3",
        "Item4"
    };
    repeater.DataBind();
}