Skip to content

Ridiculously simple Gravatar integration for Asp.Net MVC: @Html.GravatarImage("user.name@email.com")

Notifications You must be signed in to change notification settings

dmytroduk/Gravatar-HtmlHelper

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 

Repository files navigation

Gravatar HtmlHelper for ASP.Net MVC

This is a complete implementation of the Gravatar image request API, according the Gravatar documentation, as an ASP.Net MVC HtmlHelper.

Features

  • Size

  • Default image (404, mystery-man, identicon, monsterid, wavatar, retro)

  • Custom default image (url)

  • Force default image

  • Ratings

  • Secure requests (HTTPS) is automatic (but can be forced)

Getting Started

  1. Drop the single GravatarHtmlHelper.cs into your ASP.Net MVC project

  2. Start using it in your Views:

    @Html.GravatarImage("user.name@email.com")
    
    @Html.GravatarImage("user.name@email.com", 32, GravatarHtmlHelper.DefaultImage.Identicon, false, GravatarHtmlHelper.Rating.G)
    

That’s it. No attribution required, but feel free to leave a comment on my blog if you find it useful

About

Ridiculously simple Gravatar integration for Asp.Net MVC: @Html.GravatarImage("user.name@email.com")

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 100.0%