ASP.NET MVC

To use Jdenticon on a ASP.NET MVC site, start by installing the Jdenticon.AspNet.Mvc NuGet package.

PM> Install-Package Jdenticon.AspNet.Mvc

Now you can render icons on any page by using the following code:

@using Jdenticon.AspNet.Mvc

<div>
    Icon: @Html.Identicon("Value to be hashed", size: 100, alt: "Icon")
    Icon: <img src="@Url.Identicon("Value to be hashed", size: 100)" alt="Icon" width="100" height="100" />
</div>

You can also return an identicon from a controller action.

public class IconController : Controller
{
    public ActionResult Icon(string value, int size)
    {
        return IdenticonResult.FromValue(value, size);
    }
}

Read more

API documentation